Hi all,
i'm new in this community (and in .NET programming) and i've a problem with xpathnavigator.
The idea is to have an xml document with attribute editable by windows form.
I write this code, where xPath is, of course, the correct path of the selected node, and NodeEntity is a class that encapsulate the new attribute value.
The method extract value from NodeEntity and update attribute value of the current node.
But i don't find the correct method in the while (iter.MoveNext()) loop...
Can you help me, please.
Thanks, bye.
public void EditNode(string xPath, NodeEntity nodeEntity)
{
// local variable
this.xPath = xPath;
string newAttribute;
//newAttribute = "id="
// Create a navigator for select the correct parent node
XPathNavigator nav = CreateNavigator();
if (nav.CanEdit)
{
// Create an iterator for select the correct node
XPathNodeIterator iter = nav.Select(xPath);
while (iter.MoveNext())
{
//iter.Current.setvalue;
}
}
}