[JDEV] Flash 5's XMLSocket vs Jabber 1.2
Al Sutton
al at alsutton.com
Tue Oct 17 01:34:06 CDT 2000
Hi,
I'm new to the list, so apologies if I've repeated anything.
Many DOM parsers are built on top of SAX parsers. The data stream is read in
to a SAX parser which then passes the events to DOM "constructor" to build
the tree, so DOM and SAX aren't really different methods, DOM is more of a
quick and standard way of converting XML data into objects that you can use
at some point after parsing.
It is possible to use DOM on streamed data, as each block is completed you
can pass the data off to another thread for processing. I would say that
flash probably implements DOM (or a similar system) behind the scenes in
order to store details about objects that you can interact with.
I'm saying this from a "not done any work with Flash, but I've used XML
extensively from Java" viewpoint.
Hope this is useful.
Al.
----- Original Message -----
From: "Orion (Steve Pirk)" <orion at deathcon.com>
To: <jdev at jabber.org>
Sent: Tuesday, October 17, 2000 1:56 AM
Subject: Re: [JDEV] Flash 5's XMLSocket vs Jabber 1.2
> 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