Package net.sf.gridarta.utils.xml
Class ParseUtils
- java.lang.Object
-
- net.sf.gridarta.utils.xml.ParseUtils
-
public class ParseUtils extends java.lang.ObjectUtility class for parsing XML files.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static @NotNull nu.xom.DocumentreadXmlUrl(@NotNull java.net.URL url, @NotNull java.lang.String rootElement, @NotNull java.lang.String systemId, @NotNull java.lang.String resourceName, @Nullable org.xml.sax.ErrorHandler errorHandler)Reads an XML file from anURL.
-
-
-
Method Detail
-
readXmlUrl
@NotNull public static @NotNull nu.xom.Document readXmlUrl(@NotNull @NotNull java.net.URL url, @NotNull @NotNull java.lang.String rootElement, @NotNull @NotNull java.lang.String systemId, @NotNull @NotNull java.lang.String resourceName, @Nullable @Nullable org.xml.sax.ErrorHandler errorHandler) throws java.io.IOException, nu.xom.ParsingException, org.xml.sax.SAXException, java.net.URISyntaxException, nu.xom.xinclude.XIncludeExceptionReads an XML file from anURL.- Parameters:
url- the URL to readrootElement- the tag name of the root element in the DOCTYPE declarationsystemId- the system ID of the doctype declarationresourceName- the name of the resource that contains the DTD contentserrorHandler- the error handler to use ornull- Returns:
- the document for the XML file
- Throws:
java.io.IOException- if the XML file cannot be readnu.xom.ParsingException- if parsing the XML file failsorg.xml.sax.SAXException- the parsing the XML file failsjava.net.URISyntaxException- if an include cannot be resolvednu.xom.xinclude.XIncludeException- if parsing of the XML file fails
-
-