[JDEV] Flash 5's XMLSocket vs Jabber 1.2
Bill Abbas
zsa at expertq.com
Tue Oct 17 00:04:19 CDT 2000
Sounds about right.
You don't want the thing that pulls bytes off the socket to have to
parse thru
a bunch of XML just to figure out when to pass a completed XML doc back
to the thing
that parses the XML and then does something useful with it. In other
words, the null
is a little extra bit of network protocol, albeit somewhat, err, cheesy.
Bill
Orion (Steve Pirk) wrote:
> A co-worker pointed out that there are two XML transfer
> protocols: (I think that is the correct phrase :-)
>
> Method one is DOM (Document Object Model)
>
> Method two is SAX (Simple API for XML)
>
> I believe that Flash is using the SAX model. Most flash code
> "streamed", meaning it is processed as it is received.
>
> >From a section of w3.org:
> http://www.w3.org/TR/2000/WD-xmldsig-core-20000601/#sec-DOM-SAX
> [quote]
> DOM maps XML into a tree structure of nodes and typically
> assumes it will be used on an entire document with subsequent
> processing being done on this tree. SAX converts XML into
> a series of events such as a start tag, content, etc.
> [endquote]
>
> It is possible that the "null terminator" is a shortcut to
> determine end-of-tag (instead of actually searching for the
> end-of-tag).
>
> Comments? Am I totally off base here? :-)
>
> Steve
> orion at deathcon.com - owner/admin | Chaos reigns within.
> http://www.deathcon.com | Reflect, repent, and reboot.
> Think of it as evolution in action. | Order shall return.
>
> On Mon, 16 Oct 2000, David Waite wrote:
>
>
>> I think the person who wrote XMLSocket had very little clue how XML
>> workeed above the basic markup. It appears to be an incremental parser
>> that will *only* give events on document end, and generates XML
>> documents on the sending pipe deliminated by a null character.
>>
>> Someone at macromedia deserves a flogging, anyone close to their
>> headquarters? ;-)
>>
>> -David Waite
>>
>> Thomas Charron wrote:
>>
>>
>>> Quoting Oliver George <oliver at littledevil.com.au>:
>>>
>>>
>>>> Problem 1: Null characters...
>>>> =================================
>>>> null characters are sent between each transmission from the client. This
>>>> causes the server to crash. My question is: should jabber client stream be
>>>> tolerant to null characters (ie. 0x00).
>>>> If the server can't be made to tolerate this then i would probably need an
>>>> interface socket which reads from the flash client, translates (removes
>>>> nulls) and sends to the server. This is bad because i now have 3 sockets
>>>> open for a single connection.
>>>> Just to emphasise this problem here is a ngrep dump of my flash client
>>>> sending a message to the server. Notice the 00 which trails the
>>>> <stream...>
>>>
>>> Are NULL chars even LEGAL in UTF-8? Why are the null characters there? Does
>>> Flash add them in for some reason?
>>>
>>> ---
>>> Thomas Charron
>>> << Wanted: One decent sig >>
>>> << Preferably litle used >>
>>> << and stored in garage. ?>>
>>>
>>> _______________________________________________
>>> jdev mailing list
>>> jdev at jabber.org
>>> http://mailman.jabber.org/listinfo/jdev
>>
>>
>>
>> _______________________________________________
>> jdev mailing list
>> jdev at jabber.org
>> http://mailman.jabber.org/listinfo/jdev
>>
>
>
>
> _______________________________________________
> jdev mailing list
> jdev at jabber.org
> http://mailman.jabber.org/listinfo/jdev
>
>
>
More information about the JDev
mailing list