I hope I'm just missing something obvious. I have a number of repeating nodes in an XML document:
<root>
<parent>
<child/>
<child/>
</parent>
</root>
I need to examine the contents of each of the <child> elements in turn, so I need an XPathNodeIterator containing the nodeset of all the <child> nodes.
If I have an XPath th...
Given the XML
<PSG>
<C id="1">
<N id="2" >
<A id="3" />
<D id="4">
<PP />
</D>
<V id="5" >
<Tn />
<P />
</V>
<N id="6" >
<D id="7" />
<D id="8" />
</N>
...
I am searching the fastest way to count some tags in a huge xml-file (120MB)
long Quantity;
XPathDocument xDocData = new XPathDocument(str_File_path);
XPathNavigator xNavData = xDocData.CreateNavigator();
//Option 1
XPathExpression xExp = xNavData.Compile("sum(Tag/Value)");
Quantity = Convert.ToInt64(xNavData.Evaluate(xExp));
//Option...
I have two XPathNodeIterator nodeI1 and nodeI2.
I have a loop which should go through each
while(nodeI1.MoveNext())
How can I get this loop to automatically start nodeI2.MoveNext() after nodeI1 is done? I don't want to copy paste all the code and make another while loop.
...
I'm navigating XML document with XPathNodeIterator, and I want to change some nodes' values.
I can't figure out how :(
Here's the code I'm using:
XPathDocument docNav = new XPathDocument(path);
XPathNavigator nav = docNav.CreateNavigator();
nav.MoveToRoot();
XPathNodeIterator itemsIterator = nav.Select("/foo/bar/item");
while (medium...