private Element getDOMElement(final OMElement omElement) { // Get the StAX reader from the created element XMLStreamReader llomReader = omElement.getXMLStreamReader(); // Create the DOOM OMFactory OMFactory doomFactory = DOOMAbstractFactory.getOMFactory(); // Create the new builder StAXOMBuilder doomBuilder = new StAXOMBuilder(doomFactory, llomReader); // Get the document element OMElement newElem = doomBuilder.getDocumentElement(); return newElem instanceof Element ? (Element) newElem : null; }
public static OMFactory getDOOMFactory() { if (reuse) return DOOMAbstractFactory.getOMFactory(); else return new org.apache.axiom.om.impl.dom.factory.OMDOMFactory(); }