public void parse () throws Exception { if (_root == null) { try { XmlParser parser = ensureParser(); _root = parser.parse(_xml.getInputStream()); _dtd = parser.getDTD(); } finally { _xml.close(); } } }
/** * Reads and parses the XML configuration string. * * @param configuration String of XML configuration commands excluding the normal XML preamble. * The String should start with a "<Configure ....>" element. * @throws IOException if the configuration could not be read * @throws SAXException if the configuration could not be parsed */ public XmlConfiguration(String configuration) throws SAXException, IOException { configuration = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n<!DOCTYPE Configure PUBLIC \"-//Mort Bay Consulting//DTD Configure 1.2//EN\" \"http://jetty.eclipse.org/configure_1_2.dtd\">" + configuration; InputSource source = new InputSource(new StringReader(configuration)); synchronized (__parser) { setConfig( __parser.parse(source)); _dtd=__parser.getDTD(); } }
/** * Reads and parses the XML configuration file. * * @param configuration the URL of the XML configuration * @throws IOException if the configuration could not be read * @throws SAXException if the configuration could not be parsed */ public XmlConfiguration(URL configuration) throws SAXException, IOException { synchronized (__parser) { _url=configuration; setConfig(__parser.parse(configuration.toString())); _dtd=__parser.getDTD(); } }
/** * Reads and parses the XML configuration file. * * @param configuration the URL of the XML configuration * @throws IOException if the configuration could not be read * @throws SAXException if the configuration could not be parsed */ public XmlConfiguration(URL configuration) throws SAXException, IOException { synchronized (__parser) { _url=configuration; setConfig(__parser.parse(configuration.toString())); _dtd=__parser.getDTD(); } }
/** * Reads and parses the XML configuration stream. * * @param configuration An input stream containing a complete configuration file * @throws IOException if the configuration could not be read * @throws SAXException if the configuration could not be parsed */ public XmlConfiguration(InputStream configuration) throws SAXException, IOException { InputSource source = new InputSource(configuration); synchronized (__parser) { setConfig(__parser.parse(source)); _dtd=__parser.getDTD(); } }
/** * Reads and parses the XML configuration file. * * @param configuration the URL of the XML configuration * @throws IOException if the configuration could not be read * @throws SAXException if the configuration could not be parsed */ public XmlConfiguration(URL configuration) throws SAXException, IOException { synchronized (__parser) { _url=configuration; setConfig(__parser.parse(configuration.toString())); _dtd=__parser.getDTD(); } }
/** * Reads and parses the XML configuration string. * * @param configuration String of XML configuration commands excluding the normal XML preamble. * The String should start with a "<Configure ....>" element. * @throws IOException if the configuration could not be read * @throws SAXException if the configuration could not be parsed */ public XmlConfiguration(String configuration) throws SAXException, IOException { configuration = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n<!DOCTYPE Configure PUBLIC \"-//Mort Bay Consulting//DTD Configure 1.2//EN\" \"http://jetty.eclipse.org/configure_1_2.dtd\">" + configuration; InputSource source = new InputSource(new StringReader(configuration)); synchronized (__parser) { setConfig( __parser.parse(source)); _dtd=__parser.getDTD(); } }
/** * Reads and parses the XML configuration string. * * @param configuration String of XML configuration commands excluding the normal XML preamble. * The String should start with a "<Configure ....>" element. * @throws IOException if the configuration could not be read * @throws SAXException if the configuration could not be parsed */ public XmlConfiguration(String configuration) throws SAXException, IOException { configuration = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n<!DOCTYPE Configure PUBLIC \"-//Mort Bay Consulting//DTD Configure 1.2//EN\" \"http://jetty.eclipse.org/configure_1_2.dtd\">" + configuration; InputSource source = new InputSource(new StringReader(configuration)); synchronized (__parser) { setConfig( __parser.parse(source)); _dtd=__parser.getDTD(); } }
/** * Reads and parses the XML configuration stream. * * @param configuration An input stream containing a complete configuration file * @throws IOException if the configuration could not be read * @throws SAXException if the configuration could not be parsed */ public XmlConfiguration(InputStream configuration) throws SAXException, IOException { InputSource source = new InputSource(configuration); synchronized (__parser) { _url=null; setConfig(__parser.parse(source)); _dtd=__parser.getDTD(); } }
/** * Reads and parses the XML configuration string. * * @param configuration String of XML configuration commands excluding the normal XML preamble. * The String should start with a "<Configure ....>" element. * @throws IOException if the configuration could not be read * @throws SAXException if the configuration could not be parsed */ public XmlConfiguration(String configuration) throws SAXException, IOException { configuration = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n<!DOCTYPE Configure PUBLIC \"-//Jetty//Configure//EN\" \"http://eclipse.org/jetty/configure.dtd\">" + configuration; InputSource source = new InputSource(new StringReader(configuration)); synchronized (__parser) { _url=null; setConfig( __parser.parse(source)); _dtd=__parser.getDTD(); } }
/** * Reads and parses the XML configuration string. * * @param configuration String of XML configuration commands excluding the normal XML preamble. * The String should start with a "<Configure ....>" element. * @throws IOException if the configuration could not be read * @throws SAXException if the configuration could not be parsed */ public XmlConfiguration(String configuration) throws SAXException, IOException { configuration = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n<!DOCTYPE Configure PUBLIC \"-//Jetty//Configure//EN\" \"http://eclipse.org/jetty/configure.dtd\">" + configuration; InputSource source = new InputSource(new StringReader(configuration)); synchronized (__parser) { _url=null; setConfig( __parser.parse(source)); _dtd=__parser.getDTD(); } }
/** * Reads and parses the XML configuration file. * * @param configuration the URL of the XML configuration * @throws IOException if the configuration could not be read * @throws SAXException if the configuration could not be parsed */ public XmlConfiguration(URL configuration) throws SAXException, IOException { synchronized (__parser) { _url=configuration; setConfig(__parser.parse(configuration.toString())); _dtd=__parser.getDTD(); } }
/** * Reads and parses the XML configuration file. * * @param configuration the URL of the XML configuration * @throws IOException if the configuration could not be read * @throws SAXException if the configuration could not be parsed */ public XmlConfiguration(URL configuration) throws SAXException, IOException { synchronized (__parser) { _url=configuration; setConfig(__parser.parse(configuration.toString())); _dtd=__parser.getDTD(); } }
/** * Reads and parses the XML configuration stream. * * @param configuration An input stream containing a complete configuration file * @throws IOException if the configuration could not be read * @throws SAXException if the configuration could not be parsed */ public XmlConfiguration(InputStream configuration) throws SAXException, IOException { InputSource source = new InputSource(configuration); synchronized (__parser) { setConfig(__parser.parse(source)); _dtd=__parser.getDTD(); } }
/** * Reads and parses the XML configuration string. * * @param configuration String of XML configuration commands excluding the normal XML preamble. * The String should start with a "<Configure ....>" element. * @throws IOException if the configuration could not be read * @throws SAXException if the configuration could not be parsed */ public XmlConfiguration(String configuration) throws SAXException, IOException { configuration = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!DOCTYPE Configure PUBLIC \"-//Jetty//Configure//EN\" \"http://eclipse.org/jetty/configure.dtd\">" + configuration; InputSource source = new InputSource(new StringReader(configuration)); synchronized (__parser) { _url=null; setConfig( __parser.parse(source)); _dtd=__parser.getDTD(); } }
/** * Reads and parses the XML configuration stream. * * @param configuration An input stream containing a complete configuration file * @throws IOException if the configuration could not be read * @throws SAXException if the configuration could not be parsed */ public XmlConfiguration(InputStream configuration) throws SAXException, IOException { InputSource source = new InputSource(configuration); synchronized (__parser) { setConfig(__parser.parse(source)); _dtd=__parser.getDTD(); } }
/** * Reads and parses the XML configuration file. * * @param configuration the URL of the XML configuration * @throws IOException if the configuration could not be read * @throws SAXException if the configuration could not be parsed */ public XmlConfiguration(URL configuration) throws SAXException, IOException { synchronized (__parser) { _url=configuration; setConfig(__parser.parse(configuration.toString())); _dtd=__parser.getDTD(); } }
/** * Reads and parses the XML configuration stream. * * @param configuration An input stream containing a complete configuration file * @throws IOException if the configuration could not be read * @throws SAXException if the configuration could not be parsed */ public XmlConfiguration(InputStream configuration) throws SAXException, IOException { InputSource source = new InputSource(configuration); synchronized (__parser) { _url=null; setConfig(__parser.parse(source)); _dtd=__parser.getDTD(); } }
/** * Reads and parses the XML configuration stream. * * @param configuration An input stream containing a complete configuration file * @throws IOException if the configuration could not be read * @throws SAXException if the configuration could not be parsed */ public XmlConfiguration(InputStream configuration) throws SAXException, IOException { InputSource source = new InputSource(configuration); synchronized (__parser) { _url=null; setConfig(__parser.parse(source)); _dtd=__parser.getDTD(); } }
public void parse () throws Exception { if (_root == null) { try { XmlParser parser = ensureParser(); _root = parser.parse(_xml.getInputStream()); _dtd = parser.getDTD(); } finally { _xml.close(); } } }