code: public List<String> getAllXPath(NamespaceContext context, String xml, String xPathExpr) {
          List<String> result = null;
          
          NodeList nodes = (NodeList) evaluateXpath(context, xml, xPathExpr, XPathConstants.NODESET);
          if (nodes != null) {
              result = new ArrayList<String>(nodes.getLength());
              for (int i = 0; i < nodes.getLength(); i++) {
                  result.add(nodes.item(i).getNodeValue());
              }
          }
  
          return result;
      }
docs: Evaluates xPathExpr against xml, returning all matches.
  @param xml xml document to apply XPath to.
  @param xPathExpr XPath expression to evaluate.
  @return text() of all nodes matching XPath, null if xml is null.