XmlDocument.SelectSingleNode and xmlNamespace issue
问题 I'm loading a string to an XML document that contains the following structure : <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup> <Compile Include="clsWorker.cs" /> </ItemGroup> </Project> then im loading all into xmldocument : XmlDocument xmldoc = new XmlDocument(); xmldoc.LoadXml(Xml); then the following problem occurs : XmlNode Node = xmldoc.SelectSingleNode("//Compile"); //