public static void initSystemProperties() {

        String implName;
        // initialize system properties
        if (System.getProperty(SAX_PARSER_FACTORY_KEY) == null) {
            implName = SAXParserFactory.newInstance().getClass().getName();
            LOG.info("Setting sax parser factory impl property to " + implName);
            System.setProperty(SAX_PARSER_FACTORY_KEY, implName);
        }
        if (System.getProperty(XML_READER_KEY) == null) {
            SAXReader reader = new SAXReader();
            try {
                implName = reader.getXMLReader().getClass().getName();
                LOG.info("Setting xml reader impl property to " + implName);
                System.setProperty(XML_READER_KEY, implName);
            } catch (SAXException e) {
                LOG.error("Error evaluating XMLReader impl.", e);
            }
        }
        if (System.getProperty(SAX_PARSER_CONFIG_KEY) == null) {
            ParserImpl saxParser = new ParserImpl();
            implName = saxParser.getConfigImplName();
            if (implName != null) {
                LOG.info("Setting xml parser configuration impl property to " + implName);
                System.setProperty(SAX_PARSER_CONFIG_KEY, implName);
            }
        }
    }
public static void initSystemProperties ( ) { String implName ; if ( System . getProperty ( SAX_PARSER_FACTORY_KEY ) == null ) { implName = SAXParserFactory . newInstance ( ) . getClass ( ) . getName ( ) ; LOG . info ( "Setting sax parser factory impl property to " + implName ) ; System . setProperty ( SAX_PARSER_FACTORY_KEY , implName ) ; } if ( System . getProperty ( XML_READER_KEY ) == null ) { SAXReader reader = new SAXReader ( ) ; try { implName = reader . getXMLReader ( ) . getClass ( ) . getName ( ) ; LOG . info ( "Setting xml reader impl property to " + implName ) ; System . setProperty ( XML_READER_KEY , implName ) ; } catch ( SAXException e ) { LOG . error ( "Error evaluating XMLReader impl." , e ) ; } } if ( System . getProperty ( SAX_PARSER_CONFIG_KEY ) == null ) { ParserImpl saxParser = new ParserImpl ( ) ; implName = saxParser . getConfigImplName ( ) ; if ( implName != null ) { LOG . info ( "Setting xml parser configuration impl property to " + implName ) ; System . setProperty ( SAX_PARSER_CONFIG_KEY , implName ) ; } } }
Initializes XML processing system properties to avoid evaluating the XML parser and reader implementation each time an XML document is read.<p>
This is done for performance improvements only.<p>