**‘RDF::XML`** is an XML plugin for RDF.rb.
Requiring the ‘RDF::XML` module
require 'rdf-xml'
Parsing RDF statements from an XML file
RDF::XML::Reader.open("etc/doap.xml") do |reader| reader.each_statement do |statement| puts statement.inspect end end
Serializing RDF statements into an XML file
RDF::XML::Writer.open("etc/test.xml") do |writer| reader.each_statement do |statement| writer << statement end end
See Also:
Author:
[Alex Serebryakov](42cities.com/)
Modules: VERSION Classes: Format, Reader