modules/rdf/parser/rdfxml.zzm

rdf-0.0.3 documentation

NAME

rdf/parser/rdfxml - RDF/XML parser.

SYNOPSIS

  from rdf/parser/rdfxml import RdfXmlParser;

  let parser := new RdfXmlParser();
  let quads := parser.parse_file(path, base: "http://example.com/doc");

DESCRIPTION

RdfXmlParser parses RDF/XML into RDF quads. It supports RDF 1.1 RDF/XML forms including typed node elements, xml:base, xml:lang, rdf:ID, rdf:nodeID, property attributes, parseType resource, collection, and XML literal values, RDF lists, rdf:li, and reification.

Parser options are base, used for URI resolution, and into, used to load parsed quads directly into a store.

EXPORTS

Constants

  • XML_NS

    The XML namespace IRI.

  • XMLNS_NS

    The XML namespace declaration namespace IRI.

Classes

  • RdfXmlParser
    • parse_string(String text, ... options)

      Parses UTF-8 RDF/XML text. Returns an array of quads, or the supplied into store after adding the quads. Throws RDFSyntaxError on invalid RDF/XML.

    • parse_file(path, ... options)

      Reads UTF-8 from path and parses it.

    • parse_lines(Array lines, ... options)

      Parses concatenated line chunks.

    • parse_chunks(Array chunks, ... options)

      Parses concatenated string or nested-array chunks.

COPYRIGHT AND LICENCE

rdf/parser/rdfxml is copyright Toby Inkster.

It is free software; you may redistribute it and/or modify it under the terms of either the Artistic License 1.0 or the GNU General Public License version 2.