This week's book giveaway is in the Programmer Certification forum. We're giving away four copies of OCP Oracle Certified Professional Java SE 21 Developer (Exam 1Z0-830) Java SE 17 Developer (Exam 1Z0-829) Programmer’s Guide and have Khalid Mughal and Vasily Strelnikov on-line! See this thread for details.
Hai.... I have a xml file and I want to parse specific element using XPATH. Could anyone give an sample java code that could parse an xml through XPATH. Thankyou.
By "parsing" XML, I am assuming you want to query your DOM.
JDK 1.5 comes bundled with an XPath API (pl refer to package documentation of javax.xml.xpath). It is quite easy to use, with the Javadoc itself mentioning a working example.