W3C home > Mailing lists > Public > public-rdf-ruby@w3.org > June 2010

Ruby RDF/XML parser for RDF.rb

From: Gregg Kellogg <gregg@kellogg-assoc.com>
Date: Mon, 7 Jun 2010 17:57:25 -0400
To: "public-rdf-ruby@w3.org" <public-rdf-ruby@w3.org>
CC: Ben Lavender <blavender@gmail.com>, Arto Bendiken <arto.bendiken@gmail.com>, Nicholas Humfrey <nicholas.humfrey@bbc.co.uk>
Message-ID: <B23F240D-2981-4375-AC4D-F0DD1A88C61C@kellogg-assoc.com>
I just pushed version 0.0.2 of rdf-rdfxml, a Nokogiri-based parser for RDF/XML on top of the RDF.rb gem suite. It is based on the same parser implemented in the RdfContext Gem, but implemented on the RDF.rb infrastructure. Although the RdfContext version passes W3C test suites, this version does not yet. Mostly due to issues with underlying support classes that need to be worked out (URI processing, graph isomorphism and XMLLiteral support).

Thanks to Nick Humfrey for helping get the processing going and for ongoing contributions.

The project is hosted on GitHub (http://github.com/gkellogg/rdf-rdfxml) and RubyGems (http://rubygems.org/gems/rdf-rdfxml).

Basic usage is the same as for other RDF.rb readers:

RDF::RDFXML::Reader.new(data, :base_uri => 'http://example.org/example.rdf') do |reader|
  reader.each_statement do |statement|
    statement.inspect!
  end
end

or

RDF::Graph.load("http://example.org/example.rdf")

Gregg
Received on Monday, 7 June 2010 22:14:28 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 June 2010 22:14:29 GMT