Accessing Other XmlNodes


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

NODETYPE

NAME

VALUE

Attribute

Attribute Name

Attribute Value

CDATA

N/A

CDATA 's content

Comment

#comment

Text between <!-- and -->

Document

#document

N/A

DocumentFragment

#document-fragment

N/A

DocumentType

N/A

N/A

Element

Fully qualified element name

N/A

EndElement

Fully qualified element name

N/A

EndEntity

N/A

N/A

Entity

N/A

N/A

EntityReference

N/A

N/A

None

N/A

N/A

Notation

N/A

N/A

ProcessingInstruction

#processing-instruction

Process instruction text minus the target

SignificantWhitespace

N/A

The white space within markup

XmlDeclaration

Xml

The version number and encoding string

Whitespace

#whitespace

The white space in element content

Text

#text

The text content of an element or attribute



Microsoft.NET Compact Framework Kick Start
Microsoft .NET Compact Framework Kick Start
ISBN: 0672325705
EAN: 2147483647
Year: 2003
Pages: 206

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net