469,593 Members | 1,731 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,593 developers. It's quick & easy.

Troubles with XmlTextReader.ReadInnerXml()

I have a problem with System.Xml.XmlTextReader.ReadInnerXml() Method. By
using this method you think it will return a string that contains all child
nodes of the current node. I attached a sample xml to this post (bellow) for
better understanding. When I use ReadInnerXml method when reader is at
<text> element it returns a string : <c>ABC</c>. Up to now everything is ok.
It expected that the reader will finish at </text> element, but it isn't so.
The reader skips </text> and <d> elements and stops at </d>. If we ignore
<d></d> nodes, the reader will skip </text> and </a> nodes. How can I point
reader to </text> element after it reads inner xml. I don't know, is this a
bug or I'm missing here something.

Thanks for help!
<root>
<a>
<text>
<c>ABC</c>
</text>
<d></d>
</a>
</root>
Nov 11 '05 #1
0 3192

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Andy Neilson | last post: by
5 posts views Thread by Chris | last post: by
1 post views Thread by juli jul | last post: by
1 post views Thread by juli jul | last post: by
4 posts views Thread by fitsch | last post: by
2 posts views Thread by =?Utf-8?B?SmltSGVhdmV5?= | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.