https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37020

--- Comment #24 from Thomas Klausner <[email protected]> ---
In our script, we used XML::LibXML. I can provide an example patch, but before
spend that time, here's a quick preview of how the usage would look like:

    open( my $fh, '<', $input_marc_file );

    my $reader = XML::LibXML::Reader->new( IO => $fh );

    while ( $reader->read ) {
        next unless $reader->nodeType == XML_READER_TYPE_ELEMENT;
        next unless $reader->name eq 'record';

        my $xml    = $reader->readOuterXml;
        my $record = MARC::Record->new_from_xml( $xml, 'UTF8', 'MARC21' );
    }


I find that a bit easier to read than the HTML::Twig way of installing a
handler subref for 'record'.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to