code: public boolean parse(Path ttmlFilePath) {
          boolean ret;
          try {
              final DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
              dbf.setNamespaceAware(true);
  
              final DocumentBuilder db = dbf.newDocumentBuilder();
              doc = db.parse(ttmlFilePath.toFile());
  
              //Check that we have TTML v1.0 file as we have tested only them...
              final NodeList metaData = doc.getElementsByTagName("ebuttm:documentEbuttVersion");
              if (metaData != null) {
                  final Node versionNode = metaData.item(0);
                  if (versionNode == null || !versionNode.getTextContent().equalsIgnoreCase("v1.0")) {
                      throw new Exception("Unknown TTML file version");
                  }
              } else {
                  throw new Exception("Unknown File Format");
              }
  
              buildColorMap();
              buildFilmList();
              ret = true;
          } catch (Exception ex) {
              //Log.errorLog(912036478, ex, new String[]{ex.getLocalizedMessage(), "File: " + ttmlFilePath});
              Log.errorLog(912036478, new String[]{ex.getLocalizedMessage(), "File: " + ttmlFilePath});
              ret = false;
          }
          return ret;
      }
docs: Parse the TTML file into internal representation.
  
  @param ttmlFilePath the TTML file to parse