Jakob Voß > PICA-Record-0.47 > PICA::XMLWriter

Download:
PICA-Record-0.47.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.44   Source  

NAME ^

PICA::XMLWriter - Write and count PICA+ records and fields in XML format

METHODS ^

new ( [ <file-or-handle> ] [, %parameters ] )

Create a new XML writer.

write ( [ $comment, ] $record [, $record ... ] )

Write a record(s) of type PICA::Record. You can also pass strings that will be printed as comments. Please make sure to have set the default namespace ('info:srw/schema/5/picaXML-v1.0') to get valid PICA XML.

This method does not write an XML header and footer but you can easily chain method calls like this:

  $writer->start_document()->write($record)->end_document();

writefield ( $field [, $field ... ] )

Write one ore more PICA::Field in XML, based on PICA::Field-to_xml>.

start_document ( [ %params ] )

Write XML header and collection start element. The default namespace is set to 'info:srw/schema/5/picaXML-v1.0'.

Possible parameters include 'stylesheet' to add an XSLT script reference.

end_document ( )

Write XML footer (collection end element). Note that this method does close the file handle if you write to a file.

AUTHOR ^

Jakob Voss <jakob.voss@gbv.de>

LICENSE ^

Copyright (C) 2007-2009 by Verbundzentrale Göttingen (VZG) and Jakob Voß

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.

syntax highlighting: