How to Convert ATOM to RDF/XML using GRDDL

75 views
Skip to first unread message

sashikiran

unread,
Nov 28, 2009, 11:36:59 AM11/28/09
to foresite
Hii,
I need to convert ATOM feed into RDF/XML using GRDDL.
I have an ATOM feed, atom-grddl.xsl XSLT stylesheet. How Do I
implement this transformation from ATOM to RDF/XML. Can I implement
this using foresite tool kit.
I used Jena-GRDDL using which I was able to convert an XML into RDF
using GRDDL.
But that does not work for an ATOM feed.
Can somebody please help me out.
Thanks
Regards
Sashikiran

Robert Sanderson

unread,
Nov 30, 2009, 10:51:38 AM11/30/09
to fore...@googlegroups.com

Hi Sashikiran,

You could use the Python toolkit to do the conversion.

The code would be something like:

rd = ReMDocument(atom_doc)
ap = AtomParser()
rem = ap.parse(rd)
srlz = RdfLibSerializer('pretty-xml')
rem2 = rem.aggregation.register_serialization(srlz)
rd2 = rem2.get_serialization()
print rd2.data

HTH

Rob
Reply all
Reply to author
Forward
0 new messages