Module: RDF::TriX

Defined in:
vendor/bundler/ruby/3.3.0/bundler/gems/rdf-trix-4b113f65db0e/lib/rdf/trix.rb,
vendor/bundler/ruby/3.3.0/bundler/gems/rdf-trix-4b113f65db0e/lib/rdf/trix/format.rb,
vendor/bundler/ruby/3.3.0/bundler/gems/rdf-trix-4b113f65db0e/lib/rdf/trix/reader.rb,
vendor/bundler/ruby/3.3.0/bundler/gems/rdf-trix-4b113f65db0e/lib/rdf/trix/writer.rb,
vendor/bundler/ruby/3.3.0/bundler/gems/rdf-trix-4b113f65db0e/lib/rdf/trix/reader/rexml.rb,
vendor/bundler/ruby/3.3.0/bundler/gems/rdf-trix-4b113f65db0e/lib/rdf/trix/writer/rexml.rb,
vendor/bundler/ruby/3.3.0/bundler/gems/rdf-trix-4b113f65db0e/lib/rdf/trix/reader/libxml.rb,
vendor/bundler/ruby/3.3.0/bundler/gems/rdf-trix-4b113f65db0e/lib/rdf/trix/reader/nokogiri.rb,
vendor/bundler/ruby/3.3.0/bundler/gems/rdf-trix-4b113f65db0e/lib/rdf/trix/writer/nokogiri.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