
RDF::Core::Parser - RDF Parser

A module for parsing XML documents containing RDF data. It's based on XML::Parser. Parser goes through XML and calls what is referenced in Assert option for each statement found.

require RDF::Core::Parser;
my %options = (Assert => \&handleAssert,
BaseURI => "http://www.foo.com/",
BNodePrefix => "genid"
);
my $parser = new RDF::Core::Parser(%options);
$parser->parseFile('./rdfFile.xml');
#or
$parser->parse($rdfString);
Available options are
A reference to a subroutine, that is called for every assertion that parser generates.
A base URI of parsed document. It will be used to resolve relative URI references.
Blank node identifier is generated as "_:" concatenated with BNodePrefix value concatenated with counter number. Default BnodePrefix is "a".
Deprecated.
Assert handler is called with key value pairs in a parameters array.
Keys are:
namespace, local value and URI of subject
namespace, local value and URI of predicate
namespace, local value and URI of object, if the object is a resource
or
object value for literal, it's language and datatype

This package is subject to the MPL (or the GPL alternatively).

Ginger Alliance, rdf@gingerall.cz
