XmlDom.SelectSingleNode("//file[.='asp.txt']/@path")

解决方案 »

  1.   


    XmlDocument xmlDoc=new XmlDocument();
    xmlDoc.Load(xmlUrl)
    XmlNode root=xmlDoc.DocumentElement;
    root.SelectSingleNode("//file[.='asp.txt']/@path");
      

  2.   

    要返回path的值呀,要字符串xmldoc.SelectSingleNode("//csharp[file='"+Value+"']/@path")
      

  3.   

    这样返回的是一个node呀,我要path里面的值
      

  4.   

    XmlDocument xmlDoc=new XmlDocument();
    xmlDoc.Load(xmlUrl)
    XmlNode root=xmlDoc.DocumentElement;
    root.SelectSingleNode("//file[.='asp.txt']/@path");