XmlNode.SelectSingleNode returns element outside current?

后端 未结 4 1997
我在风中等你
我在风中等你 2021-02-18 17:06

my problem is like this. Let\'s say i have xml like this


  
    Value1
    

        
4条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-18 17:24

    the problem here is the XPath expression you are using, try it without the '//'. Like that:

    node.SelectSingleNode( "element3" );

    Read more here .

提交回复
热议问题