Module: RDF::TriX

Defined in:
vendor/bundler/ruby/2.4.0/bundler/gems/rdf-trix-7d61d2cef93b/lib/rdf/trix.rb,
vendor/bundler/ruby/2.4.0/bundler/gems/rdf-trix-7d61d2cef93b/lib/rdf/trix/format.rb,
vendor/bundler/ruby/2.4.0/bundler/gems/rdf-trix-7d61d2cef93b/lib/rdf/trix/reader/libxml.rb,
vendor/bundler/ruby/2.4.0/bundler/gems/rdf-trix-7d61d2cef93b/lib/rdf/trix/reader/nokogiri.rb,
vendor/bundler/ruby/2.4.0/bundler/gems/rdf-trix-7d61d2cef93b/lib/rdf/trix/reader/rexml.rb,
vendor/bundler/ruby/2.4.0/bundler/gems/rdf-trix-7d61d2cef93b/lib/rdf/trix/reader.rb,
vendor/bundler/ruby/2.4.0/bundler/gems/rdf-trix-7d61d2cef93b/lib/rdf/trix/writer/nokogiri.rb,
vendor/bundler/ruby/2.4.0/bundler/gems/rdf-trix-7d61d2cef93b/lib/rdf/trix/writer/rexml.rb,
vendor/bundler/ruby/2.4.0/bundler/gems/rdf-trix-7d61d2cef93b/lib/rdf/trix/writer.rb

Overview

RDF::TriX is a TriX extension for RDF.rb.

Examples:

Requiring the RDF::TriX module

require 'rdf/trix'

Parsing RDF statements from a TriX file

RDF::TriX::Reader.open("etc/doap.xml") do |reader|
  reader.each_statement do |statement|
    puts statement.inspect
  end
end

Serializing RDF statements into a TriX file

RDF::TriX::Writer.open("etc/test.xml") do |writer|
  reader.each_statement do |statement|
    writer << statement
  end
end

See Also:

Author:

Defined Under Namespace

Modules: VERSION Classes: Format, Reader, Writer