Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27554

Select a specific node in an Xml File

$
0
0
I have a XML file with nodes that vary to a couple of thousands. I know you can iterate through the nodes to access any node. However, iteration time can escalate to hours as the number of nodes increase. I want to bypass this by going straight to a target node. How can I do this? For example, in a file:

...........................................
Code:

<Xmlfile xmlns="">
<ANode>
 <.....>
<.....>
</ANode>

<B1Node>
 <.....>
<.....>
</B1Node>

<B2Node>
 <.....>
<.....>
</B2Node>

.............

<BNNode>
 <.....>
<.....>
</BNNode>


<CNode>
 <......> C1 <.....>
 <......> C2 <.....>
</CNode>

</.....>

..............................
How do I locate innertext C1 without any iteration? Kindly give an example if possible. Thanks for helping.

Viewing all articles
Browse latest Browse all 27554

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>