Package org.apache.axis2.om.impl.llom.builder

Examples of org.apache.axis2.om.impl.llom.builder.StAXOMBuilder


        }
        return elemnts;
    }

    private OMElement elementClone(OMElement ele){
        return  new StAXOMBuilder(ele.getXMLStreamReader()).getDocumentElement();
    }
View Full Code Here


                objects.add(arg);
            }
            argCount ++;
        }
        XMLStreamReader xr = ADBPullParser.createPullParser(opName, objects.toArray(), null);
        StAXOMBuilder stAXOMBuilder =
                OMXMLBuilderFactory.createStAXOMBuilder(
                        OMAbstractFactory.getSOAP11Factory(), xr);
        return stAXOMBuilder.getDocumentElement();
    }
View Full Code Here

    public static OMElement convertToanyType(String s) {
        try {
            XMLStreamReader r = XMLInputFactory.newInstance().createXMLStreamReader(
                    new ByteArrayInputStream(s.getBytes()));
            StAXOMBuilder builder = new StAXOMBuilder(OMAbstractFactory.getOMFactory(),r);
            return builder.getDocumentElement();
        } catch (XMLStreamException e) {
            return null;
        }
    }
View Full Code Here

    private void checkOMConformance(InputStream iStream) throws Exception {
        try {
            XMLInputFactory factory = XMLInputFactory.newInstance();

            StAXOMBuilder staxOMBuilder = OMXMLBuilderFactory.
                    createStAXOMBuilder(OMAbstractFactory.getOMFactory(),
                            factory.createXMLStreamReader(
                                    iStream));
            staxOMBuilder.setDoDebug(true);
            rootElement = staxOMBuilder.getDocumentElement();

            XMLStreamWriter writer;
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            writer = XMLOutputFactory.newInstance().
                    createXMLStreamWriter(baos);
View Full Code Here

    }

    private OMDocument getSampleOMDocument(String xml) {
        try {
            XMLStreamReader xmlStreamReader = XMLInputFactory.newInstance().createXMLStreamReader(new StringReader(xml));
            StAXOMBuilder builder = new StAXOMBuilder(xmlStreamReader);
            return builder.getDocument();
        } catch (XMLStreamException e) {
            throw new UnsupportedOperationException();
        }
    }
View Full Code Here

        try {
            XMLInputFactory factory = XMLInputFactory.newInstance();
//            factory.setProperty("http://java.sun.com/xml/stream/properties/report-cdata-event", Boolean.TRUE);

            ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(xmlString.getBytes());
            StAXOMBuilder staxOMBuilder = OMXMLBuilderFactory.
                    createStAXOMBuilder(OMAbstractFactory.getOMFactory(),
                            factory.createXMLStreamReader(byteArrayInputStream));
            staxOMBuilder.setDoDebug(true);
            OMElement rootElement = staxOMBuilder.getDocumentElement();

            ByteArrayOutputStream baos = new ByteArrayOutputStream();

            OMOutputImpl omOutput = new OMOutputImpl(baos, false);
            omOutput.ignoreXMLDeclaration(ignoreXMLDeclaration);
View Full Code Here

        try {
            XMLInputFactory factory = XMLInputFactory.newInstance();
//            factory.setProperty("http://java.sun.com/xml/stream/properties/report-cdata-event", Boolean.TRUE);

            StAXOMBuilder staxOMBuilder = OMXMLBuilderFactory.
                    createStAXOMBuilder(OMAbstractFactory.getOMFactory(),
                            factory.createXMLStreamReader(inStream));
            staxOMBuilder.setDoDebug(true);
            OMElement rootElement = staxOMBuilder.getDocumentElement();

            ByteArrayOutputStream baos = new ByteArrayOutputStream();

            OMOutputImpl omOutput = new OMOutputImpl(baos, false);
//            omOutput.ignoreXMLDeclaration(ignoreXMLDeclaration);
View Full Code Here

        OMElement rootElement;

        System.out.println("XML File:" + filePath);
        XMLInputFactory factory = XMLInputFactory.newInstance();
//        factory.setProperty("report-cdata-event", Boolean.TRUE);
        StAXOMBuilder staxOMBuilder = OMXMLBuilderFactory.
                createStAXOMBuilder(OMAbstractFactory.getOMFactory(),
                        factory.createXMLStreamReader(
                                new FileInputStream(filePath)));
        rootElement = staxOMBuilder.getDocumentElement();

        XMLStreamWriter writer;
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        writer = XMLOutputFactory.newInstance().
                createXMLStreamWriter(baos);
View Full Code Here

                "</DET></ADDRESS>";
        XMLStreamReader xmlReader=  XMLInputFactory.newInstance().createXMLStreamReader(new
                ByteArrayInputStream(str.getBytes()));
        OMFactory fac = OMAbstractFactory.getOMFactory();

        StAXOMBuilder staxOMBuilder = new
                StAXOMBuilder(fac,xmlReader);
        return   staxOMBuilder.getDocumentElement();
    }
View Full Code Here

     */
    public OMElement buildOM() throws XMLStreamException {
        XMLStreamReader xmlReader =
                XMLInputFactory.newInstance().createXMLStreamReader(serviceInputSteram);
        OMFactory fac = OMAbstractFactory.getOMFactory();
        StAXOMBuilder staxOMBuilder = new StAXOMBuilder(fac, xmlReader);
        OMElement element = staxOMBuilder.getDocumentElement();
        element.build();
        return element;
    }
View Full Code Here

TOP

Related Classes of org.apache.axis2.om.impl.llom.builder.StAXOMBuilder

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.