XPathNavigator.IsDescendant(XPathNavigator) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
确定指定 XPathNavigator 是否为当前 XPathNavigator后代。
public:
virtual bool IsDescendant(System::Xml::XPath::XPathNavigator ^ nav);
public virtual bool IsDescendant(System.Xml.XPath.XPathNavigator? nav);
public virtual bool IsDescendant(System.Xml.XPath.XPathNavigator nav);
abstract member IsDescendant : System.Xml.XPath.XPathNavigator -> bool
override this.IsDescendant : System.Xml.XPath.XPathNavigator -> bool
Public Overridable Function IsDescendant (nav As XPathNavigator) As Boolean
参数
- nav
- XPathNavigator
要 XPathNavigator 与此进行比较 XPathNavigator。
返回
注解
如果当前位于当前子代节点上,则为XPathNavigator当前XPathNavigatorXPathNavigator子代的后代。 例如,采用以下 XML 字符串:
<item><name>widget</name></item>
如果当前 XPathNavigator 位置在 item 节点上,并且 XPathNavigator 指定的位置在 name 节点上, IsDescendant 则返回 true。
此方法始终在以下条件下返回 false :
指定的 XPathNavigator 实现共享相同的实现,但指向与当前导航器不同的文档实例。
指定的 XPathNavigator 实现与当前导航器不同。