Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parsing XML from an inputStream

Status
Not open for further replies.

dendenners

Programmer
Jul 17, 2001
110
IE
Hi there,
I want to parse xml from an incoming socket stream. I want my parser to be able to respond individually to discrete xml documents arriving on the same socket (i.e. I can't use the close() method to decide when and where an xml document actually ends). I think the only way of doing this is subclassing the InputStream classes read(byte[], int, int) method to check for the XML end document tag, and manually return -1 at the point where it is encountered. However the more I look at this implementation ,the more complicated it seems. Would anyone either have
a)an example of of the implementation I am trying;
b) a better way of reading and responding to multiple xml docs on one stream.
Thanks a lot
Denis
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top