Class MARC::XMLWriter
In: lib/marc/xmlwriter.rb
Parent: Object

A class for writing MARC records as MARCXML. BIG CAVEAT! XMLWriter will not convert your MARC8 to UTF8 bug the authors to do this if you need it

Methods

close   encode   new   write  

Public Class methods

a static method that accepts a MARC::Record object and returns a REXML::Document for the XML serialization.

the constructor which you must pass a file path or an object that responds to a write message the second argument is a hash of options, currently only supporting one option, stylesheet

writer = XMLWriter.new ‘marc.xml’, :stylesheet => ‘style.xsl’ writer.write record

Public Instance methods

close underlying filehandle

write a record to the file or handle

[Validate]