Sample Java code for XPath