public static Configuration loadFromString ( String config ) throws IOException , SAXException { ConfigurationImpl cfg = new ConfigurationImpl ( ) ; XMLReader parser = XMLReaderFactory . createXMLReader ( ) ; parser . setContentHandler ( new ConfigHandler ( cfg , null ) ) ; Reader reader = new StringReader ( config ) ; parser . parse ( new InputSource ( reader ) ) ; return cfg ; }
Loads the configuration XML from the given string .