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)
{
// ...
}
โ
Opinions expressed by DZone contributors are their own.
Comments