RDF.XML.Decoder (RDF-XML.ex v0.1.0) View Source

A decoder for RDF/XML serializations to RDF.Graphs.

As for all decoders of RDF.Serialization.Formats, you normally won't use these functions directly, but via one of the read_ functions on the RDF.XML format module or the generic RDF.Serialization module.

Options

  • :base: allows to specify the base URI to be used in contexts where relative URIs are used and no base URI is defined with a xml:base definition
  • :bnode_prefix: allows to specify the prefix which auto-generated blank nodes should get (default: "b")

Link to this section Summary

Functions

Decodes an RDF/XML string to a RDF.Graph.

Decodes an RDF/XML stream to a RDF.Graph.

Link to this section Functions

Link to this function

decode(string, opts \\ [])

View Source

Specs

decode(String.t() | Enumerable.t(), keyword()) ::
  {:ok, RDF.Graph.t()} | {:error, any()}

Decodes an RDF/XML string to a RDF.Graph.

The result is returned in an :ok tuple or an :error tuple in case of an error.

For a description of the available options see the module documentation.

Link to this function

decode_from_stream(stream, opts \\ [])

View Source

Specs

decode_from_stream(Enumerable.t(), keyword()) ::
  {:ok, RDF.Graph.t()} | {:error, any()}

Decodes an RDF/XML stream to a RDF.Graph.

For a description of the available options see the module documentation.