Java XML Document Create createDocument()

Here you can find the source of createDocument()

Description

create new DOM document

License

Open Source License

Exception

Parameter Description
ParserConfigurationException in case of error

Return

empty DOM object

Declaration

public static Document createDocument() throws ParserConfigurationException 

Method Source Code

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

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

import org.w3c.dom.Document;

public class Main {
    /**//from  w ww.ja v  a2  s .  com
     * create new DOM document
     * @return empty DOM object
     * @throws ParserConfigurationException in case of error
     */
    public static Document createDocument() throws ParserConfigurationException {
        return DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
    }
}

Related

  1. createDocument()
  2. createDocument()
  3. createDocument()
  4. createDocument()
  5. createDocument()