This is a very old article. It has been imported from older blogging software, and the formatting, images, etc may have been lost. Some links may be broken. Some of the information may no longer be correct. Opinions expressed in this article may no longer be held.
Someone on IRC asked me for an example of how to parse schema.org markup using my HTML::HTML5::Microdata::Parser module. So here one is. It pulls the microdata from the page, and queries it using SPARQL.
use LWP::Simple ‘get’;
my $uri = “http://buzzword.org.uk/2012/schema-org.html”;
my $microdata = HTML::HTML5::Microdata::Parser->new(
my $query = RDF::Query->new(<<‘SPARQL’);
SELECT ?name ?page
a schema:Person ;
schema:name ?name ;
schema:url ?page .
my $people = $query->execute($microdata->graph);
while (my $person = $people->next)
“Found person: %s %s\n”,