private List<Node> validateXPath(String expression, Document xmlDocument) {
    List<Node> elements = new ArrayList<Node>();
    XPath xPath = XPathFactory.newInstance().newXPath();

    NodeList nodeList;
    try {
      // read a nodelist using xpath
      nodeList = (NodeList) xPath.compile(expression).evaluate(xmlDocument, XPathConstants.NODESET);
    } catch (XPathExpressionException e) {
      SelendroidLogger.error("Failed to get NodeList from xPath", e);
      return elements;
    }

    if (nodeList != null && nodeList.getLength() > 0) {
      for (int i = 0; i < nodeList.getLength(); i++) {
        Node node = nodeList.item(i);
        if (node.getAttributes() == null) {
          continue;
        }
        elements.add(node);
      }
    }
    return elements;
  }
the <code>source.json</code> file contains two entries where the type contains the dollar sign.
Both scenarios (simple and full class name e.g.
<code>PullToRefreshListView$InternalListView</code>) are supported and both can be used.

@throws Exception
selendroid-server/src/test/java/io/selendroid/server/model/internal/JsonXmlUtilTest.java