How I use org.w3c.dom.traversal.NodeIterator for iterate Nodes in java using Xpath
I have the follos code but doesn't work.
import org.w3c.dom.traversal.NodeIterator;
NodeIterator products = XPathAPI.selectNodeIterator(document, "/ONIXMessage/Product");
while(products.hasNext()) {
Node element = products.nextNode();
.......
}
I don't know what I have to put in the while condition