Java tutorial
//package com.java2s; import javax.xml.parsers.SAXParserFactory; public class Main { private static SAXParserFactory SAX_FACTORY; public static synchronized SAXParserFactory getSAXFactory() { if (SAX_FACTORY == null) { SAXParserFactory factory = SAXParserFactory.newInstance(); factory.setNamespaceAware(true); SAX_FACTORY = factory; } return SAX_FACTORY; } }