Interface XmlVisitor

All Known Implementing Classes:
InterningXmlVisitor, UnmarshallingContext

public interface XmlVisitor
Walks the XML document structure. Implemented by the unmarshaller and called by the API-specific connectors.

Event Call Sequence

The XmlVisitor expects the event callbacks in the following order:
 CALL SEQUENCE := startDocument ELEMENT endDocument
 ELEMENT       := startPrefixMapping ELEMENT endPrefixMapping
               |  startElement BODY endElement
 BODY          := text? (ELEMENT text?)*
 
Note in particular that text events may not be called in a row; consecutive characters (even those separated by PIs and comments) must be reported as one event, unlike SAX.

All namespace URIs, local names, and prefixes of element and attribute names must be interned. qnames need not be interned.

Typed PCDATA

For efficiency, JAXB RI defines a few CharSequence implementations that can be used as a parameter to the text(CharSequence) method. For example, see Base64Data.

Error Handling

The visitor may throw SAXException to abort the unmarshalling process in the middle.
Author:
Kohsuke Kawaguchi