Streaming XML

David Megginson david at megginson.com
Tue Feb 23 17:58:50 GMT 1999


Matthew Sergeant (EML) writes:

 > Still - I agree with your general point. What would be better would
 > be a stream of XML documents - like network packets - fully self
 > contained.

Such a stream could be brain-dead, bonehead simple to construct -- for 
example, formfeed (^L) is not allowed in XML documents, so you could
have a UDP stream consisting of a bunch of self-identifying XML
snippits separated by ^L -- to resync, the client just has to wait for 
the ^L and then start reading (my example uses the two characters "^L" 
rather than an actual formfeed to avoid screwing up mail readers):

^L
<alert xmlns="http://www.investor.com/ns/">
<date>19990223T104900-0500</date>
<company>
 <exchange>NASDAQ</exchange>
 <ticker>MSFT</ticker>
 <name>Microsoft</name>
</company>
<change>+3.5</change>
</alert>
^L
<alert xmlns="http://www.investor.com/ns/">
<date>19990223T104901-0500</date>
<company>
 <exchange>NASDAQ</exchange>
 <ticker>AMZN</ticker>
 <name>Amazon</name>
</company>
<change>+7</change>
</alert>
^L
<alert xmlns="http://www.investor.com/ns/">
<date>19990223T104903-0500</date>
<company>
 <exchange>NASDAQ</exchange>
 <ticker>YHOO</ticker>
 <name>Yahoo</name>
</company>
<change>+7.25</change>
</alert>
^L


All the best,


David

-- 
David Megginson                 david at megginson.com
           http://www.megginson.com/

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)




More information about the Xml-dev mailing list