Search in sources :

Example 1 with AxiomDocument

use of org.apache.axiom.om.impl.intf.AxiomDocument in project webservices-axiom by apache.

the class OMXMLParserWrapperImpl method getDocumentElement.

@Override
public final OMElement getDocumentElement(boolean discardDocument) {
    try {
        OMDocument document = getDocument();
        OMElement element = document.getOMDocumentElement();
        if (discardDocument) {
            element.detach();
            ((AxiomDocument) document).coreDiscard(false);
        }
        return element;
    } catch (CoreModelException ex) {
        throw AxiomExceptionTranslator.translate(ex);
    }
}
Also used : AxiomDocument(org.apache.axiom.om.impl.intf.AxiomDocument) CoreModelException(org.apache.axiom.core.CoreModelException) OMElement(org.apache.axiom.om.OMElement) OMDocument(org.apache.axiom.om.OMDocument)

Aggregations

CoreModelException (org.apache.axiom.core.CoreModelException)1 OMDocument (org.apache.axiom.om.OMDocument)1 OMElement (org.apache.axiom.om.OMElement)1 AxiomDocument (org.apache.axiom.om.impl.intf.AxiomDocument)1