XMLTextReader + SocketStream

  • Thread starter Thread starter Alexander Gnauck
  • Start date Start date
A

Alexander Gnauck

Hello,

i get my XML data over TCP/IP Sockets from a Server. And i must parse
the XML Data with the XmlTextReader because ist the fastest Method i
found. The size of my Xml files is variable. The range is from very
small to huge files. For this reason i get sometimes muliple socket
Receive Events before one Node is complete and parsable. I wanna write
the socket Data to a Stream or MemoryStream. But i have no idea how i
can append data to the Stream. The Parsing of the XmlTextReader will be
in a *while ( Reader.Read() )* Loop. Does this loop still work when i
append Data the stream? Can somebody give me some tips or code snippets?

Thanx Alex
 
Hi,
i get my XML data over TCP/IP Sockets from a Server. And i must parse
the XML Data with the XmlTextReader because ist the fastest Method i
found. The size of my Xml files is variable. The range is from very
small to huge files. For this reason i get sometimes muliple socket
Receive Events before one Node is complete and parsable. I wanna write
the socket Data to a Stream or MemoryStream. But i have no idea how i
can append data to the Stream. The Parsing of the XmlTextReader will be
in a *while ( Reader.Read() )* Loop. Does this loop still work when i
append Data the stream? Can somebody give me some tips or code snippets?

I think that you have to implement some kind of thread synchronizing.
Due to both readind from and writing to stream affect to Position index.
______________________________
With best wishes, Arthur Nesterovsky
Please visit my home page:
http://www.nesterovsky-bros.com
 
Back
Top