/** Parses XML from the given string. */ public XML(final String s) throws ParserConfigurationException, SAXException, IOException { this(null, loadXML(s)); }
/** Parses XML from the given input stream. */ public XML(final InputStream in) throws ParserConfigurationException, SAXException, IOException { this(null, loadXML(in)); }
/** Parses XML from the given input stream. */ public XML(final InputStream in) throws ParserConfigurationException, SAXException, IOException { this(null, loadXML(in)); }
/** Parses XML from the given string. */ public XML(final String s) throws ParserConfigurationException, SAXException, IOException { this(null, loadXML(s)); }
/** Parses XML from the given file. */ public XML(final File file) throws ParserConfigurationException, SAXException, IOException { this(file.getAbsolutePath(), loadXML(file)); }
/** Parses XML from the given URL. */ public XML(final URL url) throws ParserConfigurationException, SAXException, IOException { this(url.getPath(), loadXML(url)); }
/** Parses XML from the given URL. */ public XML(final URL url) throws ParserConfigurationException, SAXException, IOException { this(url.getPath(), loadXML(url)); }
/** Parses XML from the given file. */ public XML(final File file) throws ParserConfigurationException, SAXException, IOException { this(file.getAbsolutePath(), loadXML(file)); }
/** Loads an XML document from the given URL. */ private static Document loadXML(final URL url) throws ParserConfigurationException, SAXException, IOException { final InputStream in = url.openStream(); final Document document = loadXML(in); in.close(); return document; }
/** Loads an XML document from the given URL. */ private static Document loadXML(final URL url) throws ParserConfigurationException, SAXException, IOException { final InputStream in = url.openStream(); final Document document = loadXML(in); in.close(); return document; }