Package org.eclipse.rdf4j.common.xml
Class DocumentUtil
- java.lang.Object
-
- org.eclipse.rdf4j.common.xml.DocumentUtil
-
public class DocumentUtil extends java.lang.Object
Utilities to make working with DOM documents easier.
-
-
Constructor Summary
Constructors Constructor Description DocumentUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.w3c.dom.Document
getDocument(java.net.URL location)
Create a Document representing the XML file at the specified location.static org.w3c.dom.Document
getDocument(java.net.URL location, boolean validating, boolean namespaceAware)
Create a Document representing the XML file at the specified location.private static org.w3c.dom.Document
getDocument(java.net.URL location, boolean validating, boolean namespaceAware, javax.xml.validation.Schema schema)
static org.w3c.dom.Document
getDocument(java.net.URL location, javax.xml.validation.Schema schema)
Create a Document representing the XML file at the specified location.private static java.io.IOException
toIOE(java.lang.Exception e)
private static java.io.IOException
toIOE(java.lang.String message, java.lang.Exception e)
-
-
-
Method Detail
-
getDocument
public static org.w3c.dom.Document getDocument(java.net.URL location) throws java.io.IOException
Create a Document representing the XML file at the specified location.- Parameters:
location
- the location of an XML document- Returns:
- a Document representing the XML file
- Throws:
java.io.IOException
- when there was a problem retrieving or parsing the document.
-
getDocument
public static org.w3c.dom.Document getDocument(java.net.URL location, boolean validating, boolean namespaceAware) throws java.io.IOException
Create a Document representing the XML file at the specified location.- Parameters:
location
- the location of an XML documentvalidating
- whether the XML parser used in the construction of the document should validate the XMLnamespaceAware
- whether the XML parser used in the construction of the document should be aware of namespaces- Returns:
- a Document representing the XML file
- Throws:
java.io.IOException
- when there was a problem retrieving or parsing the document.
-
getDocument
public static org.w3c.dom.Document getDocument(java.net.URL location, javax.xml.validation.Schema schema) throws java.io.IOException
Create a Document representing the XML file at the specified location.- Parameters:
location
- the location of an XML documentschema
- a Schama instance to validate against- Returns:
- a Document representing the XML file
- Throws:
java.io.IOException
- when there was a problem retrieving or parsing the document.
-
getDocument
private static org.w3c.dom.Document getDocument(java.net.URL location, boolean validating, boolean namespaceAware, javax.xml.validation.Schema schema) throws java.io.IOException
- Throws:
java.io.IOException
-
toIOE
private static java.io.IOException toIOE(java.lang.Exception e)
-
toIOE
private static java.io.IOException toIOE(java.lang.String message, java.lang.Exception e)
-
-