> I receive XML document from input and I would like to read it several
> times...
[quoted text clipped - 12 lines]
> the beginning of that reader because I need to use that loop for reading
> again...
XmlTextReader is a fast forward only pull parser.
If you want to navigate back and forth then an XPathDocument
respectively an XPathNavigator created from that can help.

Signature
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Newton - 25 Apr 2005 14:14 GMT
Martin, I will try to look at it...
still one more question... I tried to create another XMLTextReader object
and simply put the content of old one to this new one. But I need copy of
whole content. So in that case I can read from both readers from the
beginning. Could you advice how to make it?
Something like this:
XmlTextReader XMLInputReader =
new XmlTextReader(fileImport.PostedFile.InputStream);
XmlTextReader XMLInputReader2 = XMLInputReader;
but it should also work...
thanks
Oleg Tkachenko [MVP] - 01 May 2005 11:12 GMT
> Martin, I will try to look at it...
>
[quoted text clipped - 6 lines]
> XmlTextReader XMLInputReader =
> new XmlTextReader(fileImport.PostedFile.InputStream);
Isn't PostedFile.InputStream a reusable stream? Can't you just create
anothe reader the same way?
If no - read the whole PostedFile.InputStream content into temporary
MemoryStream and reuse it.

Signature
Oleg Tkachenko [XML MVP, MCP]
http://blog.tkachenko.com