type = outputNode.getNodeType();
((DOMResult) outputTarget).setNode(outputNode);
}
DOMBuilder handler =
(org.w3c.dom.Node.DOCUMENT_FRAGMENT_NODE == type)
? new DOMBuilder(doc, (org.w3c.dom.DocumentFragment) outputNode)
: new DOMBuilder(doc, outputNode);
if (nextSibling != null)
handler.setNextSibling(nextSibling);
String encoding = format.getProperty(OutputKeys.ENCODING);
xoh = new ToXMLSAXHandler(handler, (LexicalHandler)handler, encoding);
}
else if (outputTarget instanceof SAXResult)