DomHandler implementation for W3C DOM (org.w3c.dom package.)
| Modifier and Type | Field and Description |
|---|---|
| private DocumentBuilder |
| Access | Constructor and Description |
|---|---|
| public | |
| public | W3CDomHandler(DocumentBuilder
must not be null. Jakarta XML Binding uses this builder)DocumentBuilder to create
a new element.Constructor that allows applications to specify which DOM implementation to be used. |
| Modifier and Type | Method and Description |
|---|---|
| public DOMResult | createUnmarshaller(ValidationEventHandler
if any error happens between the invocation of this method
and the invocation of errorHandler)getElement(Result), they
must be reported to this handler.
The caller must provide a non-null error handler.
The Result object created from this method
may hold a reference to this error handler.Implements jakarta. Result object.
|
| public DocumentBuilder | |
| public Element | getElement(DOMResult
The r)Result object created by createUnmarshaller(ValidationEventHandler).Implements jakarta. Result.
|
| public Source | marshal(Element element, ValidationEventHandler
Receives any errors happened during the process of converting
an element into a errorHandler)Source.
The caller must provide a non-null error handler.Implements jakarta. |
| public void |
| builder | back to summary |
|---|---|
| private DocumentBuilder builder | |
| W3CDomHandler | back to summary |
|---|---|
| public W3CDomHandler() Default constructor. It is up to a Jakarta XML Binding provider to decide which DOM implementation to use or how that is configured. | |
| W3CDomHandler | back to summary |
|---|---|
| public W3CDomHandler(DocumentBuilder builder) Constructor that allows applications to specify which DOM implementation to be used.
| |
| createUnmarshaller | back to summary |
|---|---|
| public DOMResult createUnmarshaller(ValidationEventHandler errorHandler) Implements jakarta. Doc from jakarta. When a Jakarta XML Binding provider needs to unmarshal a part of a document into an
infoset representation, it first calls this method to create a
A Jakarta XML Binding provider will then send a portion of the XML into the given result. Such a portion always form a subtree of the whole XML document rooted at an element.
| |
| getBuilder | back to summary |
|---|---|
| public DocumentBuilder getBuilder() | |
| getElement | back to summary |
|---|---|
| public Element getElement(DOMResult r) Implements jakarta. Doc from jakarta. Once the portion is sent to the
Multiple invocations of this method may return different objects.
This method can be invoked only when the whole sub-tree are fed
to the
| |
| marshal | back to summary |
|---|---|
| public Source marshal(Element element, ValidationEventHandler errorHandler) Implements jakarta. Doc from jakarta. This method is called when a Jakarta XML Binding provider needs to marshal an element to XML.
If non-null, the returned
| |
| setBuilder | back to summary |
|---|---|
| public void setBuilder(DocumentBuilder builder) | |