Package org.eclipse.rdf4j.common.xml

## Class DocumentUtil

- java.lang.Object
- - org.eclipse.rdf4j.common.xml.DocumentUtil

-     public class DocumentUtil
      extends Object

  Utilities to make working with DOM documents easier.
  Author:
    Herko ter Horst

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `DocumentUtil()` |

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static Document` | `getDocument​(URL location)` | Create a Document representing the XML file at the specified location.
    `static Document` | `getDocument​(URL location, boolean validating, boolean namespaceAware)` | Create a Document representing the XML file at the specified location.
    `static Document` | `getDocument​(URL location, Schema schema)` | Create a Document representing the XML file at the specified location.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DocumentUtil

          public DocumentUtil()

  - ### Method Detail

    - #### getDocument

          public static Document getDocument​(URL location)
                                      throws 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:
        `IOException` - when there was a problem retrieving or parsing the document.

    - #### getDocument

          public static Document getDocument​(URL location,
                                             boolean validating,
                                             boolean namespaceAware)
                                      throws IOException

      Create a Document representing the XML file at the specified location.
      Parameters:
        `location` - the location of an XML document
        `validating` - whether the XML parser used in the construction of the document should validate the XML
        `namespaceAware` - whether the XML parser used in the construction of the document should be aware of namespaces
      Returns:
        a Document representing the XML file
      Throws:
        `IOException` - when there was a problem retrieving or parsing the document.

    - #### getDocument

          public static Document getDocument​(URL location,
                                             Schema schema)
                                      throws IOException

      Create a Document representing the XML file at the specified location.
      Parameters:
        `location` - the location of an XML document
        `schema` - a Schama instance to validate against
      Returns:
        a Document representing the XML file
      Throws:
        `IOException` - when there was a problem retrieving or parsing the document.