Package org.jdbf.engine.xml

Examples of org.jdbf.engine.xml.SAXConfigurationBuilder


  * @return Configuration configuration tree
  * @throws MappingException
    */
    public static Configuration build(InputStream is) throws MappingException{

        SAXConfigurationBuilder builder = new SAXConfigurationBuilder();

        try{
            XMLReader parser = XMLReaderFactory.createXMLReader(
                          "org.apache.xerces.parsers.SAXParser"
                         );

            parser.setContentHandler(builder);
            parser.parse( new InputSource( new InputStreamReader(is) ) );

        }
        catch (IOException except){
            throw new MappingException("mapping.missingDBConf",is.toString());
        }
      catch (SAXException except){
            throw new MappingException(except);
        }

        //return current configuration
        return builder.getConfiguration();
    }
View Full Code Here

TOP

Related Classes of org.jdbf.engine.xml.SAXConfigurationBuilder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.