1

I'm currently working on a project which implies XML feed parsing (Atom 2005) and I'm using Rome to do this.

I have some SyndEntry objects, and I need to convert them to XML as standalone Entries (not in Feeds, Entry as root element).

I looking for a way to get something like that from a SyndEntry object :

<entry xmlns="http://www.w3.org/2005/Atom">
   <title type="text">My Title</title>
   <updated>1988-01-01T00:00:00Z</updated>
   <content type="application/xml">
      ... (my content) ...
   </content>
</entry>

--> Without Feed objects.

Any help would be appreciated, thank you in advance.

Neozaru
  • 1,109
  • 1
  • 10
  • 25

1 Answers1

0

Got it !

Entry entry = Atom10Parser.parseEntry(reader, "");

Then you have an Entry object. If ou want a SyndEntry object, you can do :

public class MyConverterForAtom10 extends ConverterForAtom10 {

public SyndEntry syndEntryFromEntry( Entry entry ) {
    return this.createSyndEntry(null,entry,false);
}

public Entry entryFromSyndEntry( SyndEntry syndentry ) {
    return this.createAtomEntry(syndentry);
}

}
Neozaru
  • 1,109
  • 1
  • 10
  • 25