Re: MARC::File::XML and parsing.

[email protected] ("Mike Rylander")
Newsgroups perl.perl4lib
Message-ID <[email protected]>
On 10/3/07, Henri-Damien LAURENT <[email protected]> wrote:
[snip]
>
> Woulditnot possible to add some feature to M::F::X which would allow
> people to collect UTF8 data as such without checking MARC21 ?
>

Sorry for the delay in reply, folks.

Actually, you should be able to do exactly what you want.  You can
either pass 'use' flags to M::F::X to set the default:

  use MARC::File::XML ( BinaryEncoding => 'utf8', RecordFormat => 'UNIMARC' );

or, if you're reading the XML by hand one record at a time, you can
use new_from_xml (after loading M::F::X, of course) with parameters:

  my $record = MARC::Record->new_from_xml( $xml, 'UTF-8', 'UNIMARC' );

Please let us know if those don't work for you.

-- 
Mike Rylander
 | VP, Research and Design
 | Equinox Software, Inc. / The Evergreen Experts
 | phone:  1-877-OPEN-ILS (673-6457)
 | email:  [email protected]
 | web:  http://www.esilibrary.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.