Android XML Document Factory Create getDocumentBuilderFactory()

Here you can find the source of getDocumentBuilderFactory()

Description

DocumentBuilderFactory instance (lazy initialization)

Declaration

private static DocumentBuilderFactory getDocumentBuilderFactory() 

Method Source Code

//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;
    }
}

Related

  1. getDocumentBuilderFactory()
  2. getDocumentBuilderFactory()
  3. CreateDocumentBuilderFactory()
  4. getDocumentBuilder()
  5. getDocumentBuilder()