Document Information Item

The Document Information Item is the root of the information found in an XML document. There is only one such root item.

This information item begins with the ContentHandler.startDocument() call and ends with the ContentHandler.endDocument() call. Many SAX2 event calls are used to construct its children or constituents.





See the sections for each type of Information Item: Document Type Declaration (one, if present), Element (one), processing instruction (possibly many), Comment (possibly many).

[document element]

This is the element in the [children] property.


See the section on Notation Information Items. (Unordered.)

[unparsed entities]

See the section on Unparsed Entity Information Items. (Unordered.)

[base URI]

Locator.getSystemId(), or XMLReader.parse()

Locator may be used during the startDocument() callback (and earlier callbacks, unless they were made in the context of an external parameter entity).

Alternatively, for any parsers that don’t provide a Locator, applications using an XMLReader are responsible for providing this information (if it exists) to the parse() method. This is passed directly as the string parameter or indirectly as the systemId property of an InputSource.

[character encoding scheme]

unavailable; or InputSource.getEncoding()

Normally this property is unavailable; it won’t affect the interpretation of character data in Java. However, ...

Get SAX2 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.