File: rubbish-example.pl

package info (click to toggle)
libxml-grddl-perl 0.004-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 448 kB
  • sloc: perl: 4,805; makefile: 7; sh: 1
file content (15 lines) | stat: -rw-r--r-- 449 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use XML::GRDDL;
use LWP::Simple;
use RDF::TrineX::Functions -shortcuts;

my $grddl = XML::GRDDL->new();
my $data  = {};
foreach my $url (qw(http://localhost/test/grddl/document.html
	http://localhost/test/grddl/document2.html
	http://localhost/test/grddl/ease.html
	http://www.w3.org/TR/grddl-primer/hotel-data.html))
{
	print "#### URL: $url\n";
	my $r = $grddl->data(get($url), $url, force_rel=>1, metadata=>1);
	print rdf_string($r, 'nquads');
}