Examples of OMDOMFactory


Examples of org.apache.axiom.om.impl.dom.factory.OMDOMFactory

    /**
     * @see javax.xml.parsers.DocumentBuilder#parse(java.io.InputStream)
     */
    public Document parse(InputStream is) throws SAXException, IOException {
        try {
            OMDOMFactory factory = new OMDOMFactory();
            XMLStreamReader reader = StAXUtils
                    .createXMLStreamReader(is);
            StAXOMBuilder builder = new StAXOMBuilder(factory, reader);
            return (DocumentImpl) builder.getDocument();
        } catch (XMLStreamException e) {
View Full Code Here

Examples of org.apache.axiom.om.impl.dom.factory.OMDOMFactory

import org.apache.axiom.soap.impl.dom.soap12.SOAP12Factory;

public class DOOMAbstractFactory {

    public static OMFactory getOMFactory() {
        return new OMDOMFactory();
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.dom.factory.OMDOMFactory

    public Document createDocument(String namespaceURI, String qualifiedName,
                                   DocumentType doctype) throws DOMException {

        // TODO Handle docType stuff
        OMDOMFactory fac = new OMDOMFactory();
        DocumentImpl doc = new DocumentImpl(fac);
        fac.setDocument(doc);

        new ElementImpl(doc, DOMUtil.getLocalName(qualifiedName),
                        new NamespaceImpl(namespaceURI, DOMUtil
                                .getPrefix(qualifiedName)), fac);
View Full Code Here

Examples of org.apache.axiom.om.impl.dom.factory.OMDOMFactory

     * Returns a new document impl.
     *
     * @see javax.xml.parsers.DocumentBuilder#newDocument()
     */
    public Document newDocument() {
        OMDOMFactory factory = new OMDOMFactory();
        DocumentImpl documentImpl = new DocumentImpl(factory);
        documentImpl.setComplete(true);
        return documentImpl;
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.dom.factory.OMDOMFactory

    }

    public Document parse(InputSource inputSource) throws SAXException,
            IOException {
        try {
            OMDOMFactory factory = new OMDOMFactory();
            // Not really sure whether this will work :-?
            XMLStreamReader reader = StAXUtils
                    .createXMLStreamReader(inputSource.getCharacterStream());
            StAXOMBuilder builder = new StAXOMBuilder(factory, reader);
            DocumentImpl doc = (DocumentImpl) builder.getDocument();
View Full Code Here

Examples of org.apache.axiom.om.impl.dom.factory.OMDOMFactory

    }

    /** @see javax.xml.parsers.DocumentBuilder#parse(java.io.InputStream) */
    public Document parse(InputStream is) throws SAXException, IOException {
        try {
            OMDOMFactory factory = new OMDOMFactory();
            XMLStreamReader reader = StAXUtils
                    .createXMLStreamReader(is);
            StAXOMBuilder builder = new StAXOMBuilder(factory, reader);
            return (DocumentImpl) builder.getDocument();
        } catch (XMLStreamException e) {
View Full Code Here

Examples of org.apache.axiom.om.impl.dom.factory.OMDOMFactory

    }

    /** @see javax.xml.parsers.DocumentBuilder#parse(java.io.File) */
    public Document parse(File file) throws SAXException, IOException {
        try {
            OMDOMFactory factory = new OMDOMFactory();
            XMLStreamReader reader = StAXUtils
                    .createXMLStreamReader(new FileInputStream(file));
            StAXOMBuilder builder = new StAXOMBuilder(factory, reader);
            return (DocumentImpl) builder.getDocument();
        } catch (XMLStreamException e) {
View Full Code Here

Examples of org.apache.axiom.om.impl.dom.factory.OMDOMFactory

import org.apache.axiom.soap.impl.dom.soap12.SOAP12Factory;

public class DOOMAbstractFactory {

    public static OMFactory getOMFactory() {
        return new OMDOMFactory();
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.dom.factory.OMDOMFactory

    public Document createDocument(String namespaceURI, String qualifiedName,
            DocumentType doctype) throws DOMException {
       
        // TODO Handle docType stuff
        OMDOMFactory fac = new OMDOMFactory();
        DocumentImpl doc = new DocumentImpl(fac);
        fac.setDocument(doc);

        new ElementImpl(doc, DOMUtil.getLocalName(qualifiedName),
                new NamespaceImpl(namespaceURI, DOMUtil
                        .getPrefix(qualifiedName)),fac);
View Full Code Here

Examples of org.apache.axiom.om.impl.dom.factory.OMDOMFactory

    public void testSearch() throws Exception {
        String NSURI = "http://testns";
        String NSURI_UPPER = "HTTP://TESTNS";

        OMFactory fac = new OMDOMFactory();
        OMNamespace ns = new NamespaceImpl(NSURI);
        OMElement el = fac.createOMElement("foo", null);
        el.declareNamespace(NSURI, "p");
        assertNull(el.findNamespace(NSURI_UPPER, "p"));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.