Using XPath with Namespaces » Fetch URI from Xml Node
// load the xml document with the sample InfoPath content
XmlDocument doc = new XmlDocument();
doc.LoadXml(xmlContent);
// the ‘my’ prefix is defined in the root element,
// so get it from there
XmlNode root = doc.DocumentElement;
string infoPathNsUri = root.GetNamespaceOfPrefix(“my”);
string infoPathNsPrefix = “infoPath”; // will be used in the xpath
You can leave a response, or trackback from your own site.



