This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
XmlDocument xmldoc = new XmlDocument(); | |
xmldoc.Load(Server.MapPath("~/path/xmlfile.xml")); | |
XmlElement root = xmldoc.DocumentElement; | |
XmlNode node = root.SelectSingleNode("<node1>/<node2>[../<node3>='" + <text to find> + "']"); | |
String html = ""; | |
html += node.InnerText + "<br />"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
XmlDocument xmldoc = new XmlDocument(); | |
xmldoc.Load(Server.MapPath("~/filepath/filename.xml")); | |
XmlElement root = xmldoc.DocumentElement; | |
XmlNodeList nodes = root.SelectNodes("//*[contains(text(), '<text to find>')]"); | |
String html = ""; | |
foreach (XmlNode node in nodes) | |
{ | |
html += node.SelectSingleNode.InnerText + "<br />"; | |
} |