Package org.apache.ws.commons.om.impl.builder

Examples of org.apache.ws.commons.om.impl.builder.StAXOMBuilder


    public Document parse(File file) throws SAXException, IOException {
        try {
            OMDOMFactory factory = new OMDOMFactory();
            XMLStreamReader reader = XMLInputFactory.newInstance()
                    .createXMLStreamReader(new FileInputStream(file));
            StAXOMBuilder builder = new StAXOMBuilder(factory, reader);
            return (DocumentImpl) builder.getDocument();
        } catch (XMLStreamException e) {
            throw new SAXException(e);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.ws.commons.om.impl.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.