code: @SuppressWarnings("deprecation")
      private void buildFilmList() throws Exception {
          final NodeList subtitleData = doc.getElementsByTagName("tt:p");
  
          for (int i = 0; i < subtitleData.getLength(); i++) {
              final Subtitle subtitle = new Subtitle();
  
              final Node subnode = subtitleData.item(i);
              if (subnode.hasAttributes()) {
                  // retrieve the begin and end attributes...
                  final NamedNodeMap attrMap = subnode.getAttributes();
                  final Node beginNode = attrMap.getNamedItem("begin");
                  final Node endNode = attrMap.getNamedItem("end");
                  if (beginNode != null && endNode != null) {
                      subtitle.begin = ttmlFormat.parse(beginNode.getNodeValue());
                      //HACK:: Don´t know why this is set like this...
                      //but we have to subract 10 hours from the XML
                      if (subtitle.begin.getHours() >= 10) {
                          subtitle.begin.setHours(subtitle.begin.getHours() - 10);
                      }
                      subtitle.end = ttmlFormat.parse(endNode.getNodeValue());
                      if (subtitle.end.getHours() >= 10) {
                          subtitle.end.setHours(subtitle.end.getHours() - 10);
                      }
  
                  }
              }
  
              final NodeList childNodes = subnode.getChildNodes();
              for (int j = 0; j < childNodes.getLength(); j++) {
                  final Node node = childNodes.item(j);
                  if (node.getNodeName().equalsIgnoreCase("tt:span")) {
                      //retrieve the text and color information...
                      final NamedNodeMap attrMap = node.getAttributes();
                      final Node styleNode = attrMap.getNamedItem("style");
                      final StyledString textContent = new StyledString();
  
                      textContent.setText(node.getTextContent());
                      final String col = colorMap.get(styleNode.getNodeValue());
                      if (col == null) {
                          textContent.setColor(color); // gabs beim BR
                      } else {
                          textContent.setColor(colorMap.get(styleNode.getNodeValue()));
                      }
                      subtitle.listOfStrings.add(textContent);
                  }
              }
              subtitleList.add(subtitle);
          }
      }
docs: Build the Subtitle objects from TTML content.