Note too that a well-formed XML document can only have one top-level element -- everything after that is normally discarded -- so that too could be used as a clue for diviing a multiple-document stream.
Or you could invent some new marker between documents, and have your input-stream filter use that to break up the docs. Or you could just pack all the XML files into a zipfile, send that, and have your recieving tool unpack that into separate files. This would have the advantage of not having to (slightly) break people's expectations about whether what they're getting back form the server is one document or several... and might actually improve performance, especially on larger documents; XML compresses wonderfully. Whichever approach you use, note that this isn't really an XML problem; it's a stream management problem. The XML parser expects to see a stream that presents only a single XML document, so breaking up the stream into multiple docs has to happend before it reaches the parser. "Ooof! There's a wasp in the room!" "Get out! Quick! Before it gets to the tiger...!" -- Monty Python, _Matching_Tie_And_Handkerchief_ ______________________________________ Joe Kesselman -- Beware of Blueshift! "The world changed profoundly and unpredictably the day Tim Berners Lee got bitten by a radioactive spider." -- Rafe Culpin, in r.m.filk --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
