Now I am want to parse xml which is coming from webservice. For parsing, I used xpath and java. I have the following code:
package test.client;
import com.s
You need to set up namespaces on your XPath
object. Use XPath.setNamespaceContext()
to do this. Alternatively you could just use local names in your XPath expression, e.g. //*[local-name()='alarm-response-list']/*[local-name()='alarm-responses']/*[local-name()='alarm']
but the namespace option is better.
A whole lot of information about using namespaces with XPath expressions is already in another answer here.