O'Reilly logo

Essential ADO.NET by Bob Beauchemin

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

8.12. Implementing XPathNavigator

XPathNavigator is a cursor-based model, optimized to be useful with the XPath query language. Because XPathNavigator uses XPath's object model, the NodeType enumeration is a little different from the NodeType enumeration used with XmlReader.

Listing 8-13 shows the possible XPathNodeTypes. Note that XPathNodeType contains significantly fewer node types than XmlNodeType and does not contain the synthetic EndElement and EndEntity node types. Implementing an XPathNavigator over an arbitrary data source is similar to implementing an Xml-Reader with respect to the design considerations (fixed versus varying schema, elements versus attributes and namespace usage) described earlier.

Listing 8-13. XPathNodeType enumeration ...

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