0

How to select an XML using XPath without considering namespace and prefix

tried

/*:OrderPerson/OrderUser/

But returns error

org.jdom.JDOMException: Invalid XPath expression: .... 
Unexpected ':'
nidhin
  • 6,661
  • 6
  • 32
  • 50

2 Answers2

4

You can try this expression

/*[local-name()='OrderPerson']/OrderUser/
dash1e
  • 7,677
  • 1
  • 30
  • 35
-1

Your xpath query has not a valid syntax try with /OrderPerson/OrderUser/*

Pooya
  • 4,385
  • 6
  • 45
  • 73