XmlPullParserNode Enum
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Specifies the XML pull-parser event codes. The numeric values match the Java XmlPullParser constants and index its diagnostic TYPES array.
public enum XmlPullParserNode
type XmlPullParserNode =
- Inheritance
-
XmlPullParserNode
Fields
| Name | Value | Description |
|---|---|---|
| StartDocument | 0 | The initial parser state, before the first event is read. Query EventType to observe this state. Unlike the XML pull-parser contract, XmlReaderPullParser can return it from its first call to NextToken(). |
| EndDocument | 1 | The end of the input document was reached. Further calls to advance the parser can throw an exception. |
| StartTag | 2 | A start tag was read. The element name, namespace, prefix, attributes, and namespace declarations can be read from the parser. An empty element still produces a separate end-tag event. |
| EndTag | 3 | An end tag was read. Under the XML pull-parser contract, the parser still reports the matching element's depth at this event; the depth decreases when the parser advances past it. XmlReaderPullParser instead reports the wrapped reader's depth. |
| Text | 4 | Character data was read. The XML pull-parser contract says that Next() combines adjacent character data, CDATA, and expanded references into text. XmlReaderPullParser does not combine these events and skips CDATA and entity-reference events. NextToken() can report the character data in separate events; end-of-line normalization depends on the XML round-trip feature. |
| Cdsect | 5 | A CDATA section was read. NextToken() reports this event; the XML pull-parser contract says that Next() combines its content with other character data into a text event. XmlReaderPullParser skips CDATA events in Next(). Text provides the section content without its delimiters. |
| EntityRef | 6 | An entity reference was read by NextToken(). Name provides the entity name, and Text provides its replacement text if available. The XML pull-parser contract says that Next() expands references into text; XmlReaderPullParser skips entity-reference events instead. |
| IgnorableWhitespace | 7 | Ignorable whitespace was read by NextToken(). The XML pull-parser contract specifies that non-validating parsers report this event only outside the root element; XmlReaderPullParser can report the wrapped reader's whitespace nodes inside the root element. Next() skips this event. Whitespace-only text is not necessarily ignorable whitespace. |
| ProcessingInstruction | 8 | An XML processing instruction was read. NextToken() reports this event, and Text provides the instruction content. Next() skips processing instructions. |
| Comment | 9 | An XML comment was read. NextToken() reports this event, and Text provides the comment content. Next() skips comments. |
| Docdecl | 10 | An XML document type declaration was read by NextToken(). The available text depends on document-type processing and the XML round-trip feature. |
Remarks
Only NextToken() exposes individual comments, CDATA sections, entity references, processing instructions, and document type declarations.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.