Here you can find the source of createDocument()
Parameter | Description |
---|---|
Exception | when error occurs |
public static Document createDocument() throws Exception
//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(); } }