This document groups functionality offered by the Stax2 interface (packages under org.codehaus.stax2) above and beyond basic Stax 1.0 API. == Access to formerly missing information == * DOCTYPE declaration: can access root name, public/system identifiers, and internal subset all separately; similarly added matching output methods * Attribute information: can find index of the specified attribute, as well as ID and NOTATION attribute indexes (as per DTD) * Location information (XMLStreamLocation2): * Access to nested Locations (parent context) * Separate byte/char offsets; value type as long instead of int to allow for multi-gigabyte input [NOT FULLY IMPLEMENTED] * Misc. information: * XMLStreamReader.isEmptyElement() (whether current START_ELEMENT was a result of an empty element, i.e. ), * XMLStreamReader.getDepth() (number of enclosing start elements, including current START_ELEMENT) == Efficient (fully streaming) access == * getText methods that write contents of textual events through Writer object passed as the argument * Pass-through XMLStreamWriter.copyEventFromReader method * XMLStreamReader.skipElement allows efficient skipping of all children of an element == Configurable writers == * All events can now be output through specified XMLStreamWriter; this allows for full configuration of output (namespace bindings, encoding/quoting) * Can define a custom quoter/encoder for textual content * Can define a custom quoter/encoder for attribute values * Raw write access using XMLStreamWriter.writeRaw(), for outputting text as is, without quoting/encoding. == Basic support for per-reader/writer configuration == * XMLStreamReader: allow overriding of external DTD subset. * XMLStreamWriter: (no options yet) == Fully pluggable bi-directional validation framework == (for Stax2 v2.0 and above, i.e. Woodstox 3.0) * Extensible: easy to add custom validators, and infoset augmenters (for example, DTD validator adds default attribute values). * Support for multiple chainable validators (for example: can do both DTD validation and RelaxNG validation simultaneously). * Fully bi-directional: can not only validate when parsing, but when outputting as well. * Configurable problem (validation error) handling: can collect all validation problems, or do fail-fast validation (exception on encountering the first problem).