Using a xpath query how do you find if a node (tag) exists at all?
For example if I needed to make sure a website page has the correct basic structure like /html/bod
A variation when using xpath in Java using count():
int numberofbodies = Integer.parseInt((String) xPath.evaluate("count(/html/body)", doc)); if( numberofbodies==0) { // body node missing }