@Override protected void provideXml(SQLXML xmlObject) throws SQLException, IOException { xmlObject.setResult(DOMResult.class).setNode(document); } };
/** * Template method for handling {@code DOMResult}s. * <p>This implementation delegates to {@code marshalDomNode}. * @param graph the root of the object graph to marshal * @param domResult the {@code DOMResult} * @throws XmlMappingException if the given object cannot be marshalled to the result * @throws IllegalArgumentException if the {@code domResult} is empty * @see #marshalDomNode(Object, org.w3c.dom.Node) */ protected void marshalDomResult(Object graph, DOMResult domResult) throws XmlMappingException { if (domResult.getNode() == null) { domResult.setNode(buildDocument()); } marshalDomNode(graph, domResult.getNode()); }
/** * <p>Zero-argument default constructor.</p> * * <p><code>node</code>, * <code>siblingNode</code> and * <code>systemId</code> * will be set to <code>null</code>.</p> */ public DOMResult() { setNode(null); setNextSibling(null); setSystemId(null); }
/** * <p>Use a DOM node to create a new output target with the specified System ID.<p> * * <p>In practice, the node should be * a {@link org.w3c.dom.Document} node, * a {@link org.w3c.dom.DocumentFragment} node, or * a {@link org.w3c.dom.Element} node. * In other words, a node that accepts children.</p> * * <p><code>siblingNode</code> will be set to <code>null</code>.</p> * * @param node The DOM node that will contain the result tree. * @param systemId The system identifier which may be used in association with this node. */ public DOMResult(Node node, String systemId) { setNode(node); setNextSibling(null); setSystemId(systemId); }
/** * <p>Use a DOM node to create a new output target.</p> * * <p>In practice, the node should be * a {@link org.w3c.dom.Document} node, * a {@link org.w3c.dom.DocumentFragment} node, or * a {@link org.w3c.dom.Element} node. * In other words, a node that accepts children.</p> * * <p><code>siblingNode</code> and * <code>systemId</code> * will be set to <code>null</code>.</p> * * @param node The DOM node that will contain the result tree. */ public DOMResult(Node node) { setNode(node); setNextSibling(null); setSystemId(null); }
setNode(node); setNextSibling(nextSibling); setSystemId(systemId);
setNode(node); setNextSibling(nextSibling); setSystemId(null);
/** * Implements org.xml.sax.ContentHandler.endDocument() * Receive notification of the end of a document. */ public void endDocument() throws SAXException { // Signal to the DOMBuilder that the document is complete _handler.endDocument(); if (!_isIdentity) { // Run the transformation now if we have a reference to a Result object if (_result != null) { try { _transformer.setDOM(_dom); _transformer.transform(null, _result); } catch (TransformerException e) { throw new SAXException(e); } } // Signal that the internal DOM is built (see 'setResult()'). _done = true; // Set this DOM as the transformer's DOM _transformer.setDOM(_dom); } if (_isIdentity && _result instanceof DOMResult) { ((DOMResult)_result).setNode(_transformer.getTransletOutputHandlerFactory().getNode()); } }
type = outputNode.getNodeType(); ((DOMResult) outputTarget).setNode(outputNode);
type = outputNode.getNodeType(); ((DOMResult) outputTarget).setNode(outputNode);
type = outputNode.getNodeType(); ((DOMResult) outputTarget).setNode(outputNode);
((DOMResult) result).setNode(doc); return new SAXOutput(new SAX2DOMEx(doc)); } else {
((DOMResult)result).setNode(_tohFactory.getNode());
type = outputNode.getNodeType(); ((DOMResult) outputTarget).setNode(outputNode);
type = outputNode.getNodeType(); ((DOMResult) outputTarget).setNode(outputNode);
((DOMResult) result).setNode(doc); return new SAXOutput(new SAX2DOMEx(doc)); } else {
public final void marshal(Object pObject, Node pNode) throws JAXBException { DOMResult dr = new DOMResult(); dr.setNode(pNode); marshal(pObject, dr); }
@Override protected void provideXml(SQLXML xmlObject) throws SQLException, IOException { xmlObject.setResult(DOMResult.class).setNode(document); } };
/** * <p>Zero-argument default constructor.</p> * * <p><code>node</code>, * <code>siblingNode</code> and * <code>systemId</code> * will be set to <code>null</code>.</p> */ public DOMResult() { setNode(null); setNextSibling(null); setSystemId(null); }
/** * <p>Zero-argument default constructor.</p> * * <p><code>node</code>, * <code>siblingNode</code> and * <code>systemId</code> * will be set to <code>null</code>.</p> */ public DOMResult() { setNode(null); setNextSibling(null); setSystemId(null); }