/** * Returns a newly created DocumentBuilder. * * @return a DocumentBuilder. * @throws BuildException on error. * @since Ant 1.6 */ public static DocumentBuilder getDocumentBuilder() throws BuildException { try { return getDocumentBuilderFactory().newDocumentBuilder(); } catch (ParserConfigurationException e) { throw new BuildException(e); } }