Examples of newDocumentBuilderFactory()


Examples of org.apache.axiom.om.dom.DOMMetaFactory.newDocumentBuilderFactory()

* instead of requesting a {@link DocumentBuilderFactory} using JAXP.
*/
public class AxiomParserPool extends StaticBasicParserPool {
    public AxiomParserPool() {
        DOMMetaFactory metaFactory = (DOMMetaFactory)OMAbstractFactory.getMetaFactory(FEATURE_DOM);
        DocumentBuilderFactory dbf = metaFactory.newDocumentBuilderFactory();
        // Unfortunately, ParserPool doesn't allow to set the DocumentBuilderFactory, so that we
        // have to use reflection here.
        try {
            Field dbfField = StaticBasicParserPool.class.getDeclaredField("builderFactory");
            dbfField.setAccessible(true);
View Full Code Here

Examples of org.apache.axiom.om.dom.DOMMetaFactory.newDocumentBuilderFactory()

     * @return DOM compatible Axiom document
     * @throws TrustException If an error occurred while creating the Document.
     */
    public static Document getOMDOMDocument() throws TrustException {
        DOMMetaFactory metaFactory = (DOMMetaFactory) OMAbstractFactory.getMetaFactory(FEATURE_DOM);
            DocumentBuilderFactory dbf = metaFactory.newDocumentBuilderFactory();
        try {
            return  dbf.newDocumentBuilder().newDocument();
        } catch (ParserConfigurationException e) {
            throw new TrustException("Error creating Axiom compatible DOM Document", e);
        }
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.