Here you can find the source of createDocument()
Parameter | Description |
---|---|
ConfigurationException | an exception |
public static Document createDocument() throws ConfigurationException
//package com.java2s; // License as published by the Free Software Foundation; either import javax.naming.ConfigurationException; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import org.w3c.dom.Document; public class Main { /**/* ww w .j a v a 2 s .co m*/ * Create a new W3C Document. * <p/> * Handles exceptions etc. * @return The new Document instance. * @throws ConfigurationException */ public static Document createDocument() throws ConfigurationException { Document doc = null; try { doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument(); } catch (ParserConfigurationException e) { throw new ConfigurationException("Failed to create ESB Configuration Document instance."); } return doc; } }