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; advancing the parser does not return it. |
| 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. The parser still reports the matching element's depth at this event; the depth decreases when the parser advances past it. |
| Text | 4 | Character data was read. Next() combines adjacent character data, CDATA, and expanded references into text. 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; Next() combines its content with other character data into a text event. 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. Next() expands references into text instead. |
| IgnorableWhitespace | 7 | Ignorable whitespace was read by NextToken(). Non-validating parsers report this event only outside the root element. Next() skips it. 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
The event constants and token behavior are defined in the Android 16 XML pull-parser source. 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.