Java XML Document Create createDocument()

Here you can find the source of createDocument()

Description

create Document

License

Open Source License

Declaration

public static Document createDocument() 

Method Source Code

//package com.java2s;
import org.w3c.dom.*;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;

public class Main {
    public static Document createDocument() {
        try {//from  w  w w  . ja  va  2 s  .co  m
            DocumentBuilderFactory dbFactory = DocumentBuilderFactory
                    .newInstance();
            DocumentBuilder docBuilder = dbFactory.newDocumentBuilder();
            Document doc = docBuilder.newDocument();
            return doc;
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
}

Related

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