O'Reilly logo

VB.NET Core Classes in a Nutshell by Ted Neward, Budi Kurniawan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

XPathNavigator

Synopsis

This class is a read-only representation of an XPathDocument based on the IXPathNavigable interface. It provides an easy-to-use data object for quick XPath-based navigation, particularly for XSLT transformations.

An XPathNavigator instance maintains its state with the current node position to provide the proper context for any XPath expression evaluation. Initially, the current node is the root node. The current node is changed by using the Select() method or the various MoveTo* methods. If the XPath expression evaluates to a set of nodes, the first node of the set is the current node for the XPathNavigator. All the Select* methods return an XPathNodeIterator object containing the set of nodes returned by the function. Except for plain-old Select(), the Select* functions do not change the current node of the XPathNavigator they are used on. Any actions on the XPathNodeIterator objects that they return also do not affect the originating object.

The Compile() method takes an XPath expression string and encapsulates it into a compiled XPathExpression object. XPathExpression objects are used by Select(), Evaluate(), and Matches() as input to search a node list.

Public MustInherit Class XPathNavigator : Implements ICloneable
' Protected Constructors
   Protected Sub New() 
' Public Instance Properties
   MustInherit Public ReadOnly Property BaseURI As String  
   MustInherit Public ReadOnly Property HasAttributes As Boolean  
   MustInherit Public ReadOnly Property HasChildren ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required