Java DOM : Creating An XML Document From XML File
Join the DZone community and get the full member experience.
Join For Free// description of your code here
try
{
//
// Create the XML Document
//
DocumentBuilderFactory dbfac = DocumentBuilderFactory.newInstance();
DocumentBuilder docBuilder = dbfac.newDocumentBuilder();
Document doc = docBuilder.parse(filePath);
// ...
}
catch (Exception e)
{
// ...
}
XML
Java (programming language)
Document
Opinions expressed by DZone contributors are their own.
Comments