com.sun.xml.bind.v2.runtime.unmarshaller
Class DomLoader<ResultT extends Result>

java.lang.Object
  extended by com.sun.xml.bind.v2.runtime.unmarshaller.Loader
      extended by com.sun.xml.bind.v2.runtime.unmarshaller.DomLoader<ResultT>

public class DomLoader<ResultT extends Result>
extends Loader

Loads a DOM.


Field Summary
 
Fields inherited from class com.sun.xml.bind.v2.runtime.unmarshaller.Loader
expectText
 
Constructor Summary
DomLoader(DomHandler<?,ResultT> dom)
           
 
Method Summary
 void childElement(UnmarshallingContext.State state, TagName ea)
          Called when this loaderis an active loaderand we see a new child start tag.
 void leaveElement(UnmarshallingContext.State state, TagName ea)
          Called when this loaderis an active loaderand we see an end tag.
 void startElement(UnmarshallingContext.State state, TagName ea)
          Called when the loader is activated, which is when a new start tag is seen and when the parent designated this loader as the child loader.
 void text(UnmarshallingContext.State state, CharSequence text)
          Called when this loaderis an active loaderand we see a chunk of text.
 
Methods inherited from class com.sun.xml.bind.v2.runtime.unmarshaller.Loader
expectText, fireAfterUnmarshal, fireBeforeUnmarshal, getExpectedChildElements, handleGenericException, handleGenericException, handleParseConversionException, reportError, reportError, reportUnexpectedChildElement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DomLoader

public DomLoader(DomHandler<?,ResultT> dom)
Method Detail

startElement

public void startElement(UnmarshallingContext.State state,
                         TagName ea)
                  throws SAXException
Description copied from class: Loader
Called when the loader is activated, which is when a new start tag is seen and when the parent designated this loader as the child loader.

The callee may change state.loader to designate another Loader for the processing. It's the responsibility of the callee to forward the startElement event in such a case.

Overrides:
startElement in class Loader
ea - info about the start tag. never null.
Throws:
SAXException

childElement

public void childElement(UnmarshallingContext.State state,
                         TagName ea)
                  throws SAXException
Description copied from class: Loader
Called when this loaderis an active loaderand we see a new child start tag.

The callee is expected to designate another loaderas a loaderthat processes this element, then it should also register a Receiver. The designated loaderwill become an active loader.

The default implementation reports an error saying an element is unexpected.

Overrides:
childElement in class Loader
Throws:
SAXException

text

public void text(UnmarshallingContext.State state,
                 CharSequence text)
          throws SAXException
Description copied from class: Loader
Called when this loaderis an active loaderand we see a chunk of text. The runtime makes sure that adjacent characters (even those separated by comments, PIs, etc) are reported as one event. IOW, you won't see two text event calls in a row.

Overrides:
text in class Loader
Throws:
SAXException

leaveElement

public void leaveElement(UnmarshallingContext.State state,
                         TagName ea)
                  throws SAXException
Description copied from class: Loader
Called when this loaderis an active loaderand we see an end tag.

Overrides:
leaveElement in class Loader
Throws:
SAXException