Answers for "how to get all the elements in xpath java"

1

how to get all the elements in xpath java

XPathExpression expr = xpath.compile("//Yourpath");
NodeList list= (NodeList) expr.evaluate(doc, XPathConstants.NODESET);
for (int i = 0; i < list.getLength(); i++) {
    Node node = list.item(i);
    System.out.println(node.getTextContent());
Posted by: Guest on June-13-2020

Code answers related to "how to get all the elements in xpath java"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language