| 
Java™ Platform Standard Ed. 6  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.xml.bind.annotation.W3CDomHandler
public class W3CDomHandler
DomHandler implementation for W3C DOM (org.w3c.dom package.)
| Constructor Summary | |
|---|---|
W3CDomHandler()
Default constructor.  | 
|
W3CDomHandler(DocumentBuilder builder)
Constructor that allows applications to specify which DOM implementation to be used.  | 
|
| Method Summary | |
|---|---|
 DOMResult | 
createUnmarshaller(ValidationEventHandler errorHandler)
When a JAXB provider needs to unmarshal a part of a document into an infoset representation, it first calls this method to create a Result object. | 
 DocumentBuilder | 
getBuilder()
 | 
 Element | 
getElement(DOMResult r)
Once the portion is sent to the Result. | 
 Source | 
marshal(Element element,
        ValidationEventHandler errorHandler)
This method is called when a JAXB provider needs to marshal an element to XML.  | 
 void | 
setBuilder(DocumentBuilder builder)
 | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public W3CDomHandler()
public W3CDomHandler(DocumentBuilder builder)
builder - must not be null. JAXB uses this DocumentBuilder to create
      a new element.| Method Detail | 
|---|
public DocumentBuilder getBuilder()
public void setBuilder(DocumentBuilder builder)
public DOMResult createUnmarshaller(ValidationEventHandler errorHandler)
DomHandlerResult object.
 A JAXB 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.
createUnmarshaller in interface DomHandler<Element,DOMResult>errorHandler - if any error happens between the invocation of this method
      and the invocation of DomHandler.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.
public Element getElement(DOMResult r)
DomHandlerResult. This method is called
 by a JAXB provider to obtain the unmarshalled element representation.
 
 Multiple invocations of this method may return different objects.
 This method can be invoked only when the whole sub-tree are fed
 to the Result object.
getElement in interface DomHandler<Element,DOMResult>r - The Result object created by DomHandler.createUnmarshaller(ValidationEventHandler).
public Source marshal(Element element,
                      ValidationEventHandler errorHandler)
DomHandler
 If non-null, the returned Source must contain a whole document
 rooted at one element, which will then be weaved into a bigger document
 that the JAXB provider is marshalling.
marshal in interface DomHandler<Element,DOMResult>errorHandler - Receives any errors happened during the process of converting
      an element into a Source.
      The caller must provide a non-null error handler.
  | 
Java™ Platform Standard Ed. 6  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright © 1993, 2010, Oracle and/or its affiliates. All rights reserved.