Here you can find the source of newDocumentBuilder()
Parameter | Description |
---|---|
ParserConfigurationException | if the creation fails |
public static DocumentBuilder newDocumentBuilder() throws ParserConfigurationException
//package com.java2s; //License from project: Apache License import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; public class Main { private static DocumentBuilderFactory _dbf = DocumentBuilderFactory.newInstance(); /**/*ww w.j av a 2 s. co m*/ * Creates and returns a new {@link DocumentBuilder}. * * @return a new {@link DocumentBuilder} * @throws ParserConfigurationException * if the creation fails */ public static DocumentBuilder newDocumentBuilder() throws ParserConfigurationException { return _dbf.newDocumentBuilder(); } }