[首頁] [教學] [安裝] [開發] [物件] [命名空間] [控制項] [函式] [資料庫] [檔案] [XML] [Office] [網站] [AJAX] [CSS] [問題] [技巧] [樣本] [參考] [示範程式] [待編] [網頁總覽]


.NET Framework 類別庫 

XPathNavigator 類別

提供游標模型來巡覽及編輯 XML 資料

The XPathNavigator enables you to move through both the attributes nodes and the namespace nodes in an XML document.

The methods and properties of the XPathNavigator operate in relation to the current node:

  • The MoveToFirstChild method moves to the first child of the current node.
  • The MoveToParent method moves to the parent node of the current node. When positioned on an attribute, you must use the MoveToParent method to move to the element that owns the attribute node. This is how you get back to the element after navigating through its attributes using MoveToFirstAttribute and MoveToNextAttribute.
  • The HasChildren property indicates whether the current node has child nodes.
  • The HasAttributes property indicates whether the current node has attribute nodes.
  • The MoveToRoot method sets the navigator to the document node that contains the whole tree of nodes.



r李明山 如意網站 ASP.NET 教學網