package com.usr.xml.dom;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import org.w3c.dom.Document;
public class CreateEmptyDOMDocument {
public static void main(String[] args) {
System.out.println("creating empty DOM Document");
try{
DocumentBuilderFactory dbf=DocumentBuilderFactory.newInstance();
DocumentBuilder db=dbf.newDocumentBuilder();
Document doc=db.newDocument();
}
catch(Exception ex){
ex.printStackTrace();
}
System.out.println("empty DOM Document created");
}
}