Walks the XML document structure. Implemented by the unmarshaller and called by the API-specific connectors.
Event Call Sequence
The {@link 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 {@link CharSequence} implementationsthat can be used as a parameter to the {@link #text(CharSequence)} method.For example, see {@link Base64Data}.
Error Handling
The visitor may throw {@link SAXException} to abort the unmarshalling processin the middle.
@author Kohsuke Kawaguchi