W3C home > Mailing lists > Public > semantic-web@w3.org > May 2008

using perl for rdf/xml to N3 conversions

From: Peter Ansell <ansell.peter@gmail.com>
Date: Sun, 1 Jun 2008 08:13:04 +1000
Message-ID: <a1be7e0e0805311513kd6d5b55l4153c41fdda18af3@mail.gmail.com>
To: "Semantic Web" <semantic-web@w3.org>

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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 21:45:22 GMT