Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

atom and xml

 
bryan lim
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you . i figured out that i should be using "//default:entry"
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic