Module: RDF::RDFXML

Defined in:
lib/rdf/rdfxml.rb,
lib/rdf/rdfxml/format.rb,
lib/rdf/rdfxml/reader.rb,
lib/rdf/rdfxml/writer.rb

Overview

**‘RDF::RDFXML`** is an RDF/XML plugin 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, XML

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]
  )
  (  [0-9a-zA-Z_\.-]
   | \\\\u([0-9a-fA-F]{4})
  )*
$},
Regexp::EXTENDED)

Class Method Summary collapse

Class Method Details

.debug=(value) ⇒ Object



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

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

.debug?Boolean

Returns:

  • (Boolean)


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

def self.debug?; @debug; end