I have a problem with WPF and XML.
What I am trying to do is display an xml element in a TextBox which I can do fine with this code
xElem.Load("/XMLFile.xml");
XmlNodeList name = xElem.GetElementsByTagName("Name");
txtBox.Text = name[0].InnerText;
The problem that I am having is that when the user clicks on a button the txtBox.Text should be equal to the next node “Name” element value (so onLoad txtBox.text would be equal to “Cut” and when the user clicks on a button it should equal to “Paste”). Im not sure how I should go about doing this.
My XML looks like this
<GESTURESET>
<GESTURE>
<Name>Cut</Name>
<Description>Cut The Object</Description>
<Number>1</Number>
</GESTURE>
<GESTURE>
<Name>Paste</Name>
<Description>Paste The Object</Description>
<Number>2</Number>
</GESTURE>
<GESTURE>
<Name>Zoom In</Name>
<Description>Zoom In on The Object</Description>
<Number>3</Number>
</GESTURE>
</GESTURESET>
Thanks in advance
Declare
private int iterator = 0;Then