Java tutorial
//package com.java2s; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; public class Main { /** * Set a {@link javax.xml.parsers.DocumentBuilderFactory} feature, suppressing any exceptions * * @param documentBuilderFactory Document builder factory * @param name Feature name * @param value Feature value */ private static void setDocBuilderFeature(DocumentBuilderFactory documentBuilderFactory, String name, boolean value) { try { documentBuilderFactory.setFeature(name, value); } catch (ParserConfigurationException e) { } } }