Beispiel #1
0
  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;
  }
Beispiel #2
0
 public static OMFactory getDOOMFactory() {
   if (reuse) return DOOMAbstractFactory.getOMFactory();
   else return new org.apache.axiom.om.impl.dom.factory.OMDOMFactory();
 }