Java XML Document Create createDocument()

Here you can find the source of createDocument()

Description

create Document

License

Open Source License

Declaration

public static Document createDocument() 

Method Source Code


//package com.java2s;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import org.w3c.dom.Document;

public class Main {
    public static Document createDocument() {
        final DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
        dbf.setNamespaceAware(true);//from www  .j  a va  2  s  . co  m
        try {
            return dbf.newDocumentBuilder().newDocument();
        } catch (final ParserConfigurationException e) {
            throw new RuntimeException();
        }
    }
}

Related

  1. createDocument()
  2. createDocument()
  3. createDocument()
  4. createDocument()
  5. createDocument()
  6. createDocument(boolean createRoot)
  7. createDocument(boolean isSecureProcessing)
  8. createDocument(boolean validating, boolean namespaceAware)
  9. createDocument(byte[] data)