src/main/java/org/jboss/loom/utils/XmlUtils.java
public static DocumentBuilder createXmlDocumentBuilder() {
        DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
        dbf.setNamespaceAware( false );
        String feat = "http://apache.org/xml/features/nonvalidating/load-external-dtd";
        try {
            dbf.setFeature( feat, false );
        } catch( ParserConfigurationException ex ) {
            log.warn( "Couldn't set " + feat + " to false. The parser may attempt to load DTD." );
        }
        try {
            return dbf.newDocumentBuilder();
        } catch( ParserConfigurationException ex ) {
            throw new RuntimeException( ex );
        }
    }
/**
     * Creates a new default document builder.
     *
     *
     */
Creates a new default document builder.
Creates a new default document builder .
public static DocumentBuilder createXmlDocumentBuilder() {
        DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
        dbf.setNamespaceAware( false );
        String feat = "http://apache.org/xml/features/nonvalidating/load-external-dtd";
        try {
            dbf.setFeature( feat, false );
        } catch( ParserConfigurationException ex ) {
            log.warn( "Couldn't set " + feat + " to false. The parser may attempt to load DTD." );
        }
        try {
            return dbf.newDocumentBuilder();
        } catch( ParserConfigurationException ex ) {
            throw new RuntimeException( ex );
        }
    }
public static DocumentBuilder createXmlDocumentBuilder ( ) { DocumentBuilderFactory dbf = DocumentBuilderFactory . newInstance ( ) ; dbf . setNamespaceAware ( false ) ; String feat = "http://apache.org/xml/features/nonvalidating/load-external-dtd" ; try { dbf . setFeature ( feat , false ) ; } catch ( ParserConfigurationException ex ) { log . warn ( "Couldn't set " + feat + " to false. The parser may attempt to load DTD." ) ; } try { return dbf . newDocumentBuilder ( ) ; } catch ( ParserConfigurationException ex ) { throw new RuntimeException ( ex ) ; } }
Creates a new default document builder.
Creates a new default document builder .