How to parse XML file using XPath parser

XPath is used to parse a XML document whenever we know  what we have to parse like: tag name, attribute name. That means we can directly indicate and parse whatever(tag or attribute value) we want to parse.   Lets see an example:   package com.sourav.xpathex; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; …

How to parse XML file using XPath parser Read More »