Traversing XML

After an XmlDocument is loaded, it is represented by an in-memory hierarchical structure of XmlNode objects. An XmlNode is an abstract class in the .NET Framework that is the base class for many different node types. The XmlNode class contains a read-only property named NodeType that contains a value in the enumeration XmlNodeType that represents the node's actual type. Table 33.1 lists the values in the XmlNodeType enumeration.

Table 33.1. XmlNodeType Enumeration
Value Description
Attribute An attribute.
CDATA A CDATA section.
Comment A comment.
Document A root document node.
DocumentFragment A node or subtree associated with this document that is part of another document.
DocumentType The document type declaration represented ...

Get Visual Basic® .NET by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.