aspose file tools*
The moose likes XML and Related Technologies and the fly likes Please help in XPath to parse XML with namespace Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Please help in XPath to parse XML with namespace" Watch "Please help in XPath to parse XML with namespace" New topic
Author

Please help in XPath to parse XML with namespace

Abhijit Das
Ranch Hand

Joined: Sep 25, 2007
Posts: 156
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


Abhijit Das
SCJP 5.0 | SCWCD 1.5
 
Consider Paul's rocket mass heater.
 
subject: Please help in XPath to parse XML with namespace
 
Similar Threads
Problem in XPath
Reading XML Documents Using DOM...
XPathAPI with SVGDocument
problem in XML Parsing using XPathAPI
selectNodeIterator() problem