Module: RDF::RDFXML

Defined in:
vendor/bundler/ruby/3.3.0/bundler/gems/rdf-rdfxml-6b89d4c13d63/lib/rdf/rdfxml.rb,
vendor/bundler/ruby/3.3.0/bundler/gems/rdf-rdfxml-6b89d4c13d63/lib/rdf/rdfxml/format.rb,
vendor/bundler/ruby/3.3.0/bundler/gems/rdf-rdfxml-6b89d4c13d63/lib/rdf/rdfxml/reader.rb,
vendor/bundler/ruby/3.3.0/bundler/gems/rdf-rdfxml-6b89d4c13d63/lib/rdf/rdfxml/writer.rb,
vendor/bundler/ruby/3.3.0/bundler/gems/rdf-rdfxml-6b89d4c13d63/lib/rdf/rdfxml/reader/rexml.rb,
vendor/bundler/ruby/3.3.0/bundler/gems/rdf-rdfxml-6b89d4c13d63/lib/rdf/rdfxml/reader/nokogiri.rb

Overview

RDF::RDFXML is an RDF/XML extension for RDF.rb.

Examples:

Requiring the RDF::RDFXML module

require 'rdf/rdfxml'

Parsing RDF statements from an XHTML+RDFXML file

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

See Also:

Author:

Defined Under Namespace

Modules: VERSION Classes: Format, Reader, Writer

Constant Summary collapse

NC_REGEXP =

Regexp matching an NCName.

Regexp.new(
%{^
  (?!\\\\u0301)             # ́ is a non-spacing acute accent.
                            # It is legal within an XML Name, but not as the first character.
  (  [a-zA-Z_]
   | \\\\u[0-9a-fA-F]{4}
  )
  (  [0-9a-zA-Z_\.-]
   | \\\\u([0-9a-fA-F]{4})
  )*
$},
Regexp::EXTENDED)

Class Method Summary collapse

Class Method Details

.debug=(value) ⇒ Object



45
# File 'vendor/bundler/ruby/3.3.0/bundler/gems/rdf-rdfxml-6b89d4c13d63/lib/rdf/rdfxml.rb', line 45

def self.debug=(value); @debug = value; end

.debug?Boolean

Returns:

  • (Boolean)


44
# File 'vendor/bundler/ruby/3.3.0/bundler/gems/rdf-rdfxml-6b89d4c13d63/lib/rdf/rdfxml.rb', line 44

def self.debug?; @debug; end