I am writing an app that will be consuming these PlayerData chunks as they come in over the network. Since I do not have the real (live) source of the data available yet, I am trying to build a 'generator' to simulate a stream by reading data from a file, packing it into a network message and sending to my app. I wanted to take advantage of the Start/End Element handlers to break up the file into the PlayerData chunks that would form the message payload. I know I could do this with C++ streams but I already had all of the XML parsing, handlers, etc., in place, just had to open the file. Also, any advice, links to patterns/examples, etc. about handling incoming XML data like this would be appreciated. I feel like there are capabilities that I am not using or at least not using in the best way. As always, thank you for your assistance. (Sorry if this is a bit scattered - trying to get it out before I have to go to a meeting.)
Jonathan -----Original Message----- From: David Bertoni [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 22, 2007 3:01 PM To: [email protected] Subject: Re: Parsing but want to save the orignal XML Coker, Jonathan M wrote: > Hello, > I am parsing a file with data of the form <DataStream> <PlayerData > id = "1"> > <x>100</x> > <y>50</y> > <z>75</z> > </PlayerData> > <PlayerData id = "2"> > <x>100</x> > <y>50</y> > <z>75</z> > </PlayerData> > . > . > . > . > > <DataStream> > > with PlayerData repeated over and over. I would like to use SAX to > parse it but retain the original XML to send elsewhere. Is this > possible? Off the top of my head, I would say you could just send the file you're parsing, but hopefully you meant something else. Can you describe what you want to do in more detail? Dave
