Tuesday, January 20, 2009

Get XML element inner text

XmlDocument xmlDocument = new XmlDocument(); // Creates new instance of XMLDocument

xmlDocument.Load(filePath); // Loads the XMLString which is XML file in one single string

XmlNode XMLElement = xmlDocument.SelectSingleNode("//data[@name='BrowserString1']//value"); // Gets the List of all XML elements foun

String value = XMLElement.InnerText;

No comments: