Exemplo n.º 1
0
 public List<MediaNode> getMediaNodes() throws Exception {
   final NodeList mediaNodeList =
       (NodeList) xpath.evaluate("/manifest/media", document, XPathConstants.NODESET);
   final List<MediaNode> mediaNodes = new ArrayList<MediaNode>();
   for (int i = 0; i < mediaNodeList.getLength(); i++) {
     mediaNodes.add(MediaNode.create(mediaNodeList.item(i), xpath));
   }
   return mediaNodes;
 }
Exemplo n.º 2
0
 public MediaNode getFirstMediaNode() throws Exception {
   return MediaNode.create(
       (Node) xpath.evaluate("/manifest/media", document, XPathConstants.NODE), xpath);
 }