XmlReader
Interface that is the entry point to the xml parsing. All implementations implement this interface, generally by delegating to a platform specific parser.
Inheritors
Types
Extended location info that actually provides column, line, and or file/string offset information.
Base interface for location information
Simple location information that just wraps a String
Properties
Get the amount of attributes on the current element
Get a range for the attributes in the reader
Get an array of all attributes in the current (startTag) event.
The declared encoding for the document. Unlike general parsing, this value is accessible after reading the document element. The document element must be the first non-whitespace element. The value for this property before document element presence is known is implementation defined (and may change).
Enhanced location info that allows a reader to provide more detail than just a string
For an unresolved entity determine whether it is known
The current namespace context
Retrieve the namespaces declared at the current level.
Retrieve the namespace URI of the current tag
The declared standalone status for the document. Unlike general parsing, this value is accessible after reading the document element. The document element must be the first non-whitespace element. The value for this property before document element presence is known is implementation defined (and may change).
The declared xml version for the document. Unlike general parsing, this value is accessible after reading the document element. The document element must be the first non-whitespace element. The value for this property before document element presence is known is implementation defined (and may change).
Functions
Get the next text sequence in the reader. This will skip over comments and ignorable whitespace (starting the content), but not tags. Any tags encountered with cause an exception to be thrown. It can either be invoked when in a start tag to return all text content, or on a content element to include it (if text or cdata) and all subsequent siblings.
Create a new reader that only returns the current element and its descendents. Such sub-reader ensures that the user of the return value does not exceed this stream.
Differs from .siblingsToFragment in that it skips the current event.
Read the current element (and content) only into a fragment.
Get the local name for the attribute at the given index.
Get the qualified name for the attribute at the given index.
Get the namespace URI for the attribute at the given index.
Get the prefix for the attribute at the given index.
Get the value of the attribute at the given index.
Get the value of the attribute with the given name if it exists.
Get a prefix for the given namespace URI, or null if there is none.
Get the namespace for the given prefix, if any
Is the currrent element character content
Determine whether the current event of the XMLReader is an element with the given name. Note that this ignores the prefix of the name.
Check that the current state is a start element for the given name. The mPrefix is ignored.
Determine whether the current event is an end tag
Determine whether the current event in the reader is ignorable. This ignores: comments, start/end document, processing instructions, document declarations, ignorable whitespace, and text that is effectively xml whitespace.
Determine whether the given prefix is known in the reader (up to this point). This can be used for reading text that could reference a namespace prefix (e.g. when parsing XPath expressions).
Is the current element a start tag
Determine whether the current state is effective whitespace, for text it will check the text.
From a start tag read the text only content of the element. Comments are allowed and handled, but subtags are not allowed. This tag finishes at the end of the element.
Check that the next element is as required. null values are not checked.
Check that the next tag element is as required. null values are not checked.
Read the current event and all subsequent siblings into a compact fragment.
From a start element, skip all element content until the corresponding end element has been read. After invocation the end element has just been read (and would be returned on relevant state calls).
Skil the preamble events in the stream reader
Write all the remaining content of the reader to a CharArrayWriter. Note that this likely fails if the reader is not at the start (as the writer would fail due to an invalid XML document).
Write the current event to the writer. This will not move the reader.
