Package org.apache.axiom.om.dom

Examples of org.apache.axiom.om.dom.DOMMetaFactory


* Custom OpenSAML 1.x {@link ParserPool} implementation that uses a DOM aware Axiom implementation
* 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


     * This method creates a DOM compatible Axiom document.
     * @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

Related Classes of org.apache.axiom.om.dom.DOMMetaFactory

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.