Java XML Document Create newDocument()

Here you can find the source of newDocument()

Description

new Document

License

Open Source License

Declaration

public static Document newDocument() throws ParserConfigurationException 

Method Source Code

//package com.java2s;
/*******************************************************************************
 * Copyright (c) 2004-2010 Sunil Kamath (IcemanK). All rights reserved. This
 * program is made available under the terms of the Common Public License v1.0
 * which is available at http://www.eclipse.org/legal/cpl-v10.html
 * /* w ww .j a v  a  2  s .com*/
 * Contributors: Sunil Kamath (IcemanK) - initial API and implementation
 *******************************************************************************/

import javax.xml.parsers.*;

import org.w3c.dom.*;

public class Main {
    private static DocumentBuilderFactory cDocumentBuilderFactory = DocumentBuilderFactory.newInstance();

    public static Document newDocument() throws ParserConfigurationException {
        return cDocumentBuilderFactory.newDocumentBuilder().newDocument();
    }
}

Related

  1. newDocument()
  2. newDocument()
  3. newDocument()
  4. newDocument()
  5. newDocument()
  6. newDocument()
  7. newDocument(boolean isNamespaceAware, boolean isValidating)
  8. newDocument(File file)
  9. newDocument(String namespaceURI, String qualifiedName)