Java XML DocumentBuilder Create newDocumentBuilder()

Here you can find the source of newDocumentBuilder()

Description

new Document Builder

License

Open Source License

Declaration

public static DocumentBuilder newDocumentBuilder() throws ParserConfigurationException 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;

public class Main {

    public static DocumentBuilder newDocumentBuilder() throws ParserConfigurationException {
        return newDocumentBuilderFactory().newDocumentBuilder();
    }//  www  .j a  va  2s.c  o m

    public static DocumentBuilderFactory newDocumentBuilderFactory() {
        DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
        dbf.setNamespaceAware(true);
        return dbf;
    }
}

Related

  1. getNewDocumentBuilder()
  2. newDocumentBuilder()
  3. newDocumentBuilder()
  4. newDocumentBuilder()
  5. newDocumentBuilder()
  6. newDocumentBuilder()
  7. newDocumentBuilder()
  8. newDocumentBuilder(Boolean disallowDoctypeDecl)
  9. newDocumentBuilder(boolean ignoreWhitespace, boolean ignoreComment)