Hi I have xml file (which is actually msbuild file) that uses different namespace
You need to use the correct namespace, which is "http://schemas.microsoft.com/developer/msbuild/2003
".
Try
XmlDocument xml = new XmlDocument();
xml.Load("ref.props");
XmlNamespaceManager nsmgr = new XmlNamespaceManager(xml.NameTable);
nsmgr.AddNamespace("ms", "http://schemas.microsoft.com/developer/msbuild/2003");
XmlNode platform_node
= xml.SelectSingleNode("/ms:Project/ms:PropertyGroup[contains(@Condition, '1111')]",
nsmgr);
Don't confuse the namespace prefix (which was empty in the XML) with the namespace, which is "http://schemas.microsoft.com/developer/msbuild/2003
".