Java XML Document Create createDocument()

Here you can find the source of createDocument()

Description

Creates a Document instance.

License

Open Source License

Exception

Parameter Description
Exception when error occurs

Return

the created Document

Declaration

public static Document createDocument() throws Exception 

Method Source Code

//package com.java2s;

import javax.xml.parsers.DocumentBuilderFactory;

import org.w3c.dom.Document;

public class Main {
    /**/*w  w  w.  ja v  a 2s.co m*/
     * Creates a Document instance.
     *
     * @return the created Document
     * @throws Exception
     *             when error occurs
     */
    public static Document createDocument() throws Exception {
        return DocumentBuilderFactory.newInstance().newDocumentBuilder()
                .newDocument();
    }
}

Related

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