/** * @author Neil Rotstan * @since 1.0 */ static { try { m_documentCreator = DocumentBuilderFactory.newInstance().newDocumentBuilder(); } catch (ParserConfigurationException parserError) { throw new RuntimeException( "XMLManager: Unable to setup DocumentBuilder: " + parserError.getMessage()); } }
public static Document newXMLDocument() { DocumentBuilder dbuilder = null; try { dbuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); } catch (ParserConfigurationException e) { e.printStackTrace(); return null; } return dbuilder.newDocument(); }