晕倒.
你SelectSingleNode("//Document") 不就行了?

解决方案 »

  1.   

    XML is case-sensitive, but you can trySelectNodes("*[translate(name(),'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz') = 'document']
    if you are interested in custom function, also seehttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnexxml/html/xml10212002.asp
      

  2.   

    区分大小写,你写上正确的"Document"不行么。从xml文件着手,xml文件也是严格规定格式的。
      

  3.   

    海盗兄,别晕,我的意思是有的xml文档中是"Document",有的是"document";思归兄,如果每个节点都做这样的判断会不会很耗资源?
      

  4.   

    sure, but shouldn't be much, since you need that flexibility, you really don't have much choice, right? you can run some performance testing to see the difference
      

  5.   

    XmlNode.SelectNodes("//Document|//document");http://blog.csdn.net/guoyan19811021/archive/2003/11/16/19882.aspx
    http://www.w3schools.com/xpath/xpath_functions.asp