Accessing Other XmlNodes

Thus far we have examined elements, attributes, and document nodes, but the .NET Compact Framework's XML DOM architecture also provides XmlNode implementations for each XML node type defined in the System.Xml.XmlNodeType enumeration. The two most important pieces of information, name and value, have different meanings in the context of different nodes. Table 11.1 lists each System.Xml.XmlNodeType and the values of their corresponding Name and Value properties.

Table 11.1. XmlNodeTypes and Their Names and Values
NODETYPENAMEVALUE
AttributeAttribute NameAttribute Value
CDATAN/ACDATA's content
Comment#commentText between <!-- and -->
Document#documentN/A
DocumentFragment#document-fragmentN/A
DocumentTypeN/AN/A
ElementFully qualified ...

Get Microsoft® .NET Compact Framework Kick Start 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.