Here you can find the source of CreateDocument()
public static Document CreateDocument()
//package com.java2s; /*//from ww w . j av a2s. c om * JLib - Publicitas Java library v1.2.0. * * Copyright (c) 2005, 2006, 2007, 2008, 2009 Publicitas SA. * Licensed under LGPL (LGPL-LICENSE.txt) license. */ import javax.xml.parsers.*; import org.w3c.dom.Document; public class Main { public static Document CreateDocument() { try { return DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument(); } catch (ParserConfigurationException e) { e.printStackTrace(); } catch (FactoryConfigurationError e) { e.printStackTrace(); } return null; } }