On Thu, 23 Jun 2005 10:29:59 +0200, Axel Weiß wrote: Hi
> you could try to make your data stream look like legal xml content, by > preceding the stream with a xml header and an opening root element. It > would then look like > > <?xml version="1.0"?> > <data-stream> > <FIRSTMESSAGE>...</FIRSTMESSAGE><SECONDMESSAGE>...</SECONDMESSAGE> > > This can be parsed with SAX parser, even if the root element never will > be closed. Thanks for your suggestion, I forgot to mention that each XML-Message might contain header-information, so I could have something like <!DOCTYPE STREET_REF SYSTEM "fti://repository/dtd/STREET_REF"> <FIRSTMESSAGE>...</FIRSTMESSAGE> <?xml version="1.0" encoding="UTF-8" standalone="no" ?> <!DOCTYPE STREET_REF SYSTEM "fti://repository/dtd/STREET_REF"> <SECONDMESSAGE>...</SECONDMESSAGE> which would not lead to a valid XML-Message, because there are <?xml...>- and <!DOCTYPE..>-elements somewhere in between... We know, however, that every XML-Message starts on a new line, so we might need to concatenate lines until we have a complete XML-Message and then use that... Also kind of ugly and potentially time-consuming, but I don't see any other way except to write a small specialized XML-Grammar and this still wouldn't be able to parse messages in encodings like UTF-16. Dominik. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
