Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Please help in XPath to parse XML with namespace

 
Abhijit Das
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
I can not parse XML document having namespace in the root element.Is there any condition to parse a XML file with namespace by using XPath APIs?I have a .xml file with the following root element with namespace ( it is .xpdl file generated from BPMN).
e.g.

The Above file is not parsing. My coding is


But, once I change the attribute of <Package> element with only one type of attribute "xmlns".
It works fine.
Thanks in advance
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic