|
How to create an empty DOM document |
|
|
This Java tip illustrates a method of creating an empty DOM document. Java provides
a class DocumentBuilder which provides functionality of creating documents. Developer
may create various kind of documents using this class.
public static Document createDomDocument() {
try {
DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
Document doc = builder.newDocument();
return doc;
} catch (ParserConfigurationException e) {
}
return null;
}
|
Related Tips
|
Page 1 of 0 ( 0 comments )
You can share your information about this topic using the form below!
Please do not post your questions with this form! Thanks.