GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
RDF::Simple::Parser(3) User Contributed Perl Documentation RDF::Simple::Parser(3)

RDF::Simple::Parser - convert RDF string to bucket of triples

A simple RDF/XML parser - reads a string containing RDF in XML returns a 'bucket-o-triples' (array of arrays)

  my $uri = 'http://www.zooleika.org.uk/bio/foaf.rdf';
  my $rdf = LWP::Simple::get($uri);
  my $parser = RDF::Simple::Parser->new(base => $uri)
  my @triples = $parser->parse_rdf($rdf);
  # Returns an array of array references which are triples

new( [ base => 'http://example.com/foo.rdf' ])
Create a new RDF::Simple::Parser object.

'base' supplies a base URI for relative URIs found in the document

'http_proxy' optionally supplies the address of an http proxy server. If this is not given, it will try to use the default environment settings.

parse_rdf($rdf)
Accepts a string which is an RDF/XML document (complete XML, with headers)

Returns an array of array references which are RDF triples.

parse_file($sFname)
Takes one argument, a string which is a fully qualified filename. Reads the contents of that file, parses it as RDF, and returns the same thing as parse_rdf().
parse_uri($uri)
Accepts a string which is a fully qualified http:// uri at which some valid RDF lives. Fetches the remote file and returns the same thing as parse_rdf().
getns
Returns a hashref of all namespaces found in the document.

Please report bugs via the RT web site <http://rt.cpan.org/Ticket/Create.html?Queue=RDF-Simple>

Jo Walsh <jo@london.pm.org> Currently maintained by Martin Thurn <mthurn@cpan.org>

This module is available under the same terms as perl itself
2020-03-06 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.