The type of the XML node that the reader is currently positioned on.
[Visual Basic] Public ReadOnly Property NodeType As XmlNodeType [C#] public XmlNodeType NodeType {get;} [C++] public: __property XmlNodeType get_NodeType(); [JScript] public function get NodeType() : XmlNodeType;
The value of this property reflects the state of the reader as follows:
NodeType | XmlReader state | Example |
---|---|---|
StartTag | Positioned on a start tag | <item value="1"> |
EndTag | Positioned on an end tag | </item> |
Text | Positioned on text between markup tags | text between tags |
CData | Positioned on a CDATA element | <![CDATA[...]]> |
Comment | Positioned on a comment | <!-- this is a comment--> |
PI | Positioned on a processing instruction | <?pi instructions?> |
Header | Positioned on the XML header | <?xml version="1.0"?> |
DocType | Positioned on the document type declaration | <!DOCTYPE order SYSTEM "order.dtd"> |
BOF | Positioned at the beginning of the input stream | |
EOF | Positioned at the end of the input stream |
Note that an empty tag is reported as a start tag immediately followed by an end tag. In other words, a tag of the form
See Also