Module: RDF::Raptor::NTriples

Defined in:
lib/rdf/raptor/ntriples.rb

Overview

N-Triples support.

Examples:

Requiring the RDF::Raptor module

require 'rdf/raptor'

Parsing RDF statements from an N-Triples file

RDF::Reader.open("input.nt") do |reader|
  reader.each_statement do |statement|
    puts statement.inspect
  end
end

Serializing RDF statements into an N-Triples file

RDF::Writer.open("output.nt") do |writer|
  graph.each_statement do |statement|
    writer << statement
  end
end

See Also:

Defined Under Namespace

Classes: Format, Reader, Writer