Skip to content

Instantly share code, notes, and snippets.

@danlentz
Forked from njh/rdfa-load
Created May 24, 2011 03:05
Show Gist options
  • Save danlentz/988082 to your computer and use it in GitHub Desktop.
Save danlentz/988082 to your computer and use it in GitHub Desktop.
Example of parsing RDFa into a graph
#!/usr/bin/env ruby
require 'rubygems'
require 'rdf/rdfa'
graph = RDF::Graph.load('http://rdfa.digitalbazaar.com/test-suite/test-cases/xhtml1/0001.xhtml', :base_uri => 'http://rdfa.digitalbazaar.com/test-suite/test-cases/xhtml1/0001.xhtml')
graph.each_statement do |statement|
statement.inspect!
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment