Accessing the feed/entry/id field of an ATOM 1.0 feed with the ROME library
Posted
by PartlyCloudy
on Stack Overflow
See other posts from Stack Overflow
or by PartlyCloudy
Published on 2010-06-12T15:57:14Z
Indexed on
2010/06/12
16:02 UTC
Read the original article
Hit count: 384
Hi,
I feel a bit stupid asking this question, but I don't know how I can access the ID field of an entry when using ROME to parse an Atom feed.
ROME provides it's own meta level of feeds/items, i.e. SyndFeed
and SyndEntry
. Being an abstraction over RSS and ATOM they only contain elements both formats support. Thus, there is no method to get an ID of an entry. There also exist low level packages for the distinct formats, and the Atom package contains com.sun.syndication.feed.atom.Entry
, which provides getId()
.
However, I don't know how can I convert my SyndEntry
into an Entry
. I have not found a way to convert it. The (outdated) tutorials show a conversion, but that's only for output though.
So how can I easily access the ID field?
Thanks in advance.
© Stack Overflow or respective owner