XMLTextReader + SocketStream

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Alexander Gnauck

    #1

    XMLTextReader + SocketStream

    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


  • Arthur Nesterovsky

    #2
    Re: XMLTextReader + SocketStream

    Hi,
    [color=blue]
    > 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?[/color]

    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:




    Comment

    Working...