core/src/main/java/com/opentext/ia/sdk/support/xml/XmlUtil.java
public static Document parse(File file) {
    if (!file.isFile()) {
      throw new IllegalArgumentException("Missing file: " + file.getAbsolutePath());
    }
    try {
      try (InputStream stream = Files.newInputStream(file.toPath(), StandardOpenOption.READ)) {
        return parse(stream);
      }
    } catch (IOException e) {
      throw new IllegalArgumentException("Failed to parse " + file.getAbsolutePath(), e);
    }
  }
public static Document parse(File file) {
    if (!file.isFile()) {
      throw new IllegalArgumentException("Missing file: " + file.getAbsolutePath());
    }
    try {
      try (InputStream stream = Files.newInputStream(file.toPath(), StandardOpenOption.READ)) {
        return parse(stream);
      }
    } catch (IOException e) {
      throw new IllegalArgumentException("Failed to parse " + file.getAbsolutePath(), e);
    }
  }
public static Document parse ( File file ) { if ( ! file . isFile ( ) ) { throw new IllegalArgumentException ( "Missing file: " + file . getAbsolutePath ( ) ) ; } try { try ( InputStream stream = Files . newInputStream ( file . toPath ( ) , StandardOpenOption . READ ) ) { return parse ( stream ) ; } } catch ( IOException e ) { throw new IllegalArgumentException ( "Failed to parse " + file . getAbsolutePath ( ) , e ) ; } }
Parse the content of a given file into an XML document.
@param file The file to parse
@return The parsed XML document
Parse the content of a given file into an XML document .