Java XML Document Create newDocument()

Here you can find the source of newDocument()

Description

new Document

License

Open Source License

Declaration

public static Document newDocument() throws ParserConfigurationException 

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 DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();

    public static Document newDocument() throws ParserConfigurationException {
        factory.setNamespaceAware(true);
        factory.setExpandEntityReferences(true);
        return factory.newDocumentBuilder().newDocument();
    }//from   www  .j  a v  a  2s .c o m
}

Related

  1. newDocument()
  2. newDocument()
  3. newDocument()
  4. newDocument()
  5. newDocument()
  6. newDocument()
  7. newDocument()
  8. newDocument()
  9. newDocument()