rmmarsh
asked on
How to set the textreader to beginning after doing a read?
I have some code that uses TextReader to look for errors in the XML file before any processing. I'm using:
textReader.ResetState(); // reset it...
but it doesn't seem to be setting it back to the beginning of the stream (or file).
How to fix this so I can read the TextReader from the beginning?
textReader.ResetState(); // reset it...
but it doesn't seem to be setting it back to the beginning of the stream (or file).
How to fix this so I can read the TextReader from the beginning?
ASKER
Error 10 'System.Xml.XmlTextReader' does not contain a definition for 'BaseStream'
and no extension method 'BaseStream' accepting a first argument of type 'System.Xml.XmlTextReader' could be found
and no extension method 'BaseStream' accepting a first argument of type 'System.Xml.XmlTextReader'
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you again... I appreciate it...
textReader.BaseStream.Seek
textReader.DiscardBuffered
textReader.BaseStream.Posi
textReader.DiscardBuffered