Here you can find the source of getDocumentBuilderFactory()
private static DocumentBuilderFactory getDocumentBuilderFactory()
//package com.java2s; import javax.xml.parsers.DocumentBuilderFactory; public class Main { /**/* ww w.j a v a2s. com*/ * singleton */ private static DocumentBuilderFactory documentBuilderFactory = null; /** * DocumentBuilderFactory instance (lazy initialization) * * @return */ private static DocumentBuilderFactory getDocumentBuilderFactory() { if (documentBuilderFactory == null) { documentBuilderFactory = DocumentBuilderFactory.newInstance(); } return documentBuilderFactory; } }