Package org.apache.axiom.om

Examples of org.apache.axiom.om.OMXMLStreamReaderConfiguration


    }

    protected void runTest() throws Throwable {
        InputStream in = TestGetXMLStreamReaderWithPreserveNamespaceContext.class.getResourceAsStream("AXIOM-114.xml");
        OMElement root = OMXMLBuilderFactory.createOMBuilder(metaFactory.getOMFactory(), in).getDocumentElement();
        OMXMLStreamReaderConfiguration configuration = new OMXMLStreamReaderConfiguration();
        configuration.setPreserveNamespaceContext(true);
        XMLStreamReader reader = root.getFirstElement().getFirstElement().getXMLStreamReader(true, configuration);
        assertEquals(XMLStreamReader.START_ELEMENT, reader.next());
        assertEquals(4, reader.getNamespaceCount());
        Set prefixes = new HashSet();
        for (int i=0; i<4; i++) {
View Full Code Here


        OMNamespace ns2 = factory.createOMNamespace(new String("urn:ns2"), "q");
        OMElement root = factory.createOMElement("root", ns1);
        root.addAttribute("attr", "value", ns2);
        factory.createOMElement("child", ns2, root);
       
        OMXMLStreamReaderConfiguration configuration = new OMXMLStreamReaderConfiguration();
        configuration.setNamespaceURIInterning(true);
        XMLStreamReader reader = root.getXMLStreamReader(true, configuration);
        reader.nextTag();
        assertInterned(reader.getNamespaceURI());
        assertInterned(reader.getAttributeNamespace(0));
        for (int i=0; i<reader.getNamespaceCount(); i++) {
View Full Code Here

        forceExpand();
        return super.getFirstElement();
    }

    public XMLStreamReader getXMLStreamReader(boolean cache) {
        return getXMLStreamReader(cache, new OMXMLStreamReaderConfiguration());
    }
View Full Code Here

        forceExpand();
        return super.getFirstElement();
    }

    public XMLStreamReader getXMLStreamReader(boolean cache) {
        return getXMLStreamReader(cache, new OMXMLStreamReaderConfiguration());
    }
View Full Code Here

        forceExpand();
        super.removeAttribute(attr);
    }

    public XMLStreamReader getXMLStreamReader(boolean cache) {
        return getXMLStreamReader(cache, new OMXMLStreamReaderConfiguration());
    }
View Full Code Here

TOP

Related Classes of org.apache.axiom.om.OMXMLStreamReaderConfiguration

Copyright © 2018 www.massapicom. 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.