Here you can find the source of getDocumentBuilder()
Parameter | Description |
---|---|
ParserConfigurationException | if a DocumentBuildercannot be created which satisfies the configuration requested. |
private static DocumentBuilder getDocumentBuilder() throws ParserConfigurationException
//package com.java2s; /*L// ww w. j a v a2 s . com * Copyright Washington University in St. Louis, SemanticBits, Persistent Systems, Krishagni. * * Distributed under the OSI-approved BSD 3-Clause License. * See http://ncip.github.com/commons-module/LICENSE.txt for details. */ import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; public class Main { /** * @return DocumentBuilder object * @throws ParserConfigurationException if a DocumentBuilder * cannot be created which satisfies the configuration requested. */ private static DocumentBuilder getDocumentBuilder() throws ParserConfigurationException { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); return dbf.newDocumentBuilder(); } }