EDN Admin
Well-known member
Hello,
Here is my code.
<span style="color:#0000ff; font-size:x-small <span style="color:#0000ff; font-size:x-small <font size="2" color="#0000ff <font size="2" color="#0000ff
Dim
</font></font><font size="2" color="#0000ff
</font>
<span style="font-size:x-small rdr <span style="color:#0000ff; font-size:x-small <span style="color:#0000ff; font-size:x-small As<span style="font-size:x-small XmlReader = XmlReader.Create(<span style="color:#0000ff; font-size:x-small <span style="color:#0000ff; font-size:x-small New<span style="font-size:x-small
System.IO.StringReader(<span style="color:#a31515; font-size:x-small <span style="color:#a31515; font-size:x-small "<root><a/><b/><c></c><d/><e x=1/><e x=2/><f/></root>"<span style="font-size:x-small ))<font size="2
rdr.ReadToDescendant(
</font>
<span style="color:#a31515; font-size:x-small <span style="color:#a31515; font-size:x-small "e"<span style="font-size:x-small )
<span style="font-size:x-small Console.WriteLine(<span style="color:#a31515; font-size:x-small <span style="color:#a31515; font-size:x-small "nodename: "<span style="font-size:x-small & rdr.Name)
<span style="font-size:x-small The above code works. But, how do I read directly to the second e node. I want something like this.
rdr.ReadToDescendant(<span style="color:#a31515; font-size:x-small <span style="color:#a31515; font-size:x-small "e[@x=2]"<span style="font-size:x-small )
is it possible??
Thanks
View the full article
Here is my code.
<span style="color:#0000ff; font-size:x-small <span style="color:#0000ff; font-size:x-small <font size="2" color="#0000ff <font size="2" color="#0000ff
Dim
</font></font><font size="2" color="#0000ff
</font>
<span style="font-size:x-small rdr <span style="color:#0000ff; font-size:x-small <span style="color:#0000ff; font-size:x-small As<span style="font-size:x-small XmlReader = XmlReader.Create(<span style="color:#0000ff; font-size:x-small <span style="color:#0000ff; font-size:x-small New<span style="font-size:x-small
System.IO.StringReader(<span style="color:#a31515; font-size:x-small <span style="color:#a31515; font-size:x-small "<root><a/><b/><c></c><d/><e x=1/><e x=2/><f/></root>"<span style="font-size:x-small ))<font size="2
rdr.ReadToDescendant(
</font>
<span style="color:#a31515; font-size:x-small <span style="color:#a31515; font-size:x-small "e"<span style="font-size:x-small )
<span style="font-size:x-small Console.WriteLine(<span style="color:#a31515; font-size:x-small <span style="color:#a31515; font-size:x-small "nodename: "<span style="font-size:x-small & rdr.Name)
<span style="font-size:x-small The above code works. But, how do I read directly to the second e node. I want something like this.
rdr.ReadToDescendant(<span style="color:#a31515; font-size:x-small <span style="color:#a31515; font-size:x-small "e[@x=2]"<span style="font-size:x-small )
is it possible??
Thanks
View the full article