Home > DeveloperSection > Forums > problem in using xpath
Jack C
Jack C

Total Post:13

Points:91
Posted on    November-09-2010 2:55 AM

 XML XML 
Ratings:


 1 Reply(s)
 1481  View(s)
Rate this:
problem in using xpath to access child node
how use it?


Amit Singh

Total Post:103

Points:721
Posted on    November-26-2010 5:02 AM

we acces the child node from xml data we use many method
one is

XmlDocument doc = new XmlDocument();
doc.Load(Server.MapPath("doc.xml"));
XmlNode target = doc.SelectSingleNode("/root/itemsA/item[@id='1']");
string result = target.InnerText;

Don't want to miss updates? Please click the below button!

Follow MindStick