aspose file tools
The moose likes XML and Related Technologies and the fly likes atom and xml Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Reply Bookmark "atom and xml" Watch "atom and xml" New topic
Author

atom and xml

bryan lim
Ranch Hand

Joined: Dec 26, 2008
Posts: 140
is atom the same as xml? can i use xpath on it and traverse the node the same way as xml?

may i know what is the xpath of the below atom? am i right to say it is:

/feed/id/link/link/title/link/link/updated/openSearch:itemsPerPage/link/entry if i want to get to <entry>?




Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 16483
    
    2

Yes, Atom is written in XML. As for your XPath expression, I haven't followed the whole thing but you're going to run into the problem where XPath 1.0 can't find elements with names in the default namespace. You would have to define a namespace context for the URI of the default namespace and assign it a prefix, then use that prefix in your XPath expression.
bryan lim
Ranch Hand

Joined: Dec 26, 2008
Posts: 140
thank you . i figured out that i should be using "//default:entry"
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: atom and xml
 
Similar Threads
Another XML Conversion Problem
stratup Exception
How to parse xml inpustream?
using treewalker to traverse
include js codes into a js variable