protected static void loadXML ( InputStream inputStream , Loader loader ) throws ConfigException { try { SAXParserFactory factory = SAXParserFactory . newInstance ( ) ; SAXParser parser = factory . newSAXParser ( ) ; XMLReader reader = parser . getXMLReader ( ) ; reader . setContentHandler ( loader ) ; reader . parse ( new InputSource ( inputStream ) ) ; } catch ( Exception e ) { throw new ConfigException ( "Fail to load configuration document from file |%s|: %s" , inputStream , e ) ; } }
Load configuration document from file .