Methods Summary |
---|
public javax.xml.transform.dom.DOMResult | createUnmarshaller(javax.xml.bind.ValidationEventHandler errorHandler)
if(builder==null)
return new DOMResult();
else
return new DOMResult(builder.newDocument());
|
public javax.xml.parsers.DocumentBuilder | getBuilder()
return builder;
|
public org.w3c.dom.Element | getElement(javax.xml.transform.dom.DOMResult r)
// JAXP spec is ambiguous about what really happens in this case,
// so work defensively
Node n = r.getNode();
if( n instanceof Document ) {
return ((Document)n).getDocumentElement();
}
if( n instanceof Element )
return (Element)n;
if( n instanceof DocumentFragment )
return (Element)n.getChildNodes().item(0);
// if the result object contains something strange,
// it is not a user problem, but it is a JAXB provider's problem.
// That's why we throw a runtime exception.
throw new IllegalStateException(n.toString());
|
public javax.xml.transform.Source | marshal(org.w3c.dom.Element element, javax.xml.bind.ValidationEventHandler errorHandler)
return new DOMSource(element);
|
public void | setBuilder(javax.xml.parsers.DocumentBuilder builder)
this.builder = builder;
|