Java tutorial
//package com.java2s; //License from project: Apache License import javax.xml.parsers.DocumentBuilderFactory; public class Main { public static DocumentBuilderFactory getDBF() { DocumentBuilderFactory fac = getDBF(true); return fac; } public static DocumentBuilderFactory getDBF(final boolean namespaceaware) { DocumentBuilderFactory fac = DocumentBuilderFactory.newInstance(); fac.setValidating(false); fac.setNamespaceAware(namespaceaware); fac.setXIncludeAware(true); return fac; } }