File: exampleD.pl

package info (click to toggle)
libhtml-microformats-perl 0.105-6
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 1,340 kB
  • sloc: perl: 14,121; makefile: 10; sh: 1
file content (17 lines) | stat: -rwxr-xr-x 419 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use 5.010;
use lib "lib";
use HTML::Microformats;
use strict;
use JSON;
use Data::Dumper;
use RDF::TrineShortcuts;

my $html = <<HTML;
<a rel="me" href="foo1">foo1</a>
<a rel="me" href="foo2">foo2</a>
<a rel="me" href="foo3">foo3</a>
<a rel="friend met" href="bar1">bar1</a>
HTML

my $doc = HTML::Microformats->new_document($html, 'http://example.net/')->assume_all_profiles;
print rdf_string($doc->model => 'rdfxml');