I need to select a node which has attribute name
as _1.1.1
I am trying to select the node as
XmlNamespaceManager nsmgr = new XmlNamespaceManager(xmlDoc.NameTable);
nsmgr.AddNamespace("IKS", "http://schemas.microsoft.com/wix/2006/objects");
XmlNode xRootNode = xmlDoc.SelectSingleNode("//folder[@name='Global']");
But it doesn't return any. I'm sure its because of the special characters in my expression. How should I handle it to get the desired node?
EDIT: I access node as
XmlNamespaceManager nsmgr = new XmlNamespaceManager(xmlDoc.NameTable);
nsmgr.AddNamespace("IKS", "http://schemas.microsoft.com/wix/2006/objects");
XmlNode xRootNode = xmlDoc.SelectSingleNode("//folder[@name='Global']", nsmgr);
and the XML is
<?xml version="1.0" encoding="UTF-8"?>
<workplace xmlns='IKS:'>
<cabinet name='Groups%20and%20Departments' oid='_1.25.18'>
<folder name='Global' oid='_1.11.9882'></folder>
</cabinet>
</workplace>