Module: RDF::RDFXML

Defined in:
lib/rdf/rdfxml.rb,
lib/rdf/rdfxml/format.rb,
lib/rdf/rdfxml/reader.rb,
lib/rdf/rdfxml/writer.rb,
lib/rdf/rdfxml/reader/rexml.rb,
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 'lib/rdf/rdfxml.rb', line 45

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

.debug?Boolean

Returns:

  • (Boolean)


44
# File 'lib/rdf/rdfxml.rb', line 44

def self.debug?; @debug; end