using perl for rdf/xml to N3 conversions

Hi all,

I am not an expert in perl, but I have hacked together a script that
requires me to convert an rdf/xml document into an N3/NTriples
document. My current ideas are as follows, but I can't make them work
properly.

   $rdfXmlParser = new RDF::Notation3::XML();
   $model = $rdfXmlParser->parse_string($rdf_data);

   $rdfN3RDFCore = new RDF::Notation3::RDFCore();
   $n3 = $rdfN3RDFCore->get_n3($model);

   print($n3);

Just wondering if anyone here has experience in this and could point
me in the right direction. The documentation for these packages
doesn't explain how to make anything interoperate and doesn't have
many examples to follow.

Cheers,

Peter

Received on Saturday, 31 May 2008 22:34:43 UTC