Problems with MARC::Batch strict_off

2007-08-13 Thread Andy Kohler
I'm using MARC-Record-2.0.0, and having problems when batch processing records with (really) bad data. Batch->strict_off isn't enough: apparently USMARC.pm's decode() routine calls Field->new, which croaks (dies), so the warning handling done by Batch->strict_off can't help. I've attached a test

Re: z39.50 queries to OCLC server

2007-08-22 Thread Andy Kohler
For question #2, I believe use attribute 12 (local number) will work. Use attribute 1211 may also work, but 12 is probably what you want. http://www.oclc.org/support/documentation/z3950/searchtips/ http://www.rlg.org/en/page.php?Page_ID=20985 I can't answer #1. --Andy On 8/22/07, Anne Highsmith

Converting XML to MARC without reading a file?

2018-04-18 Thread Andy Kohler
Hi - I'm pulling records from the WorldCat Search API in MARCXML, and need to convert them to binary MARC for further evaluation, which I'll do via MARC::Record. Problem: Converting from MARCXML via MARC::File::XML seems to require reading the records from a file. I've already got the XML stored

Re: Converting XML to MARC without reading a file?

2018-04-18 Thread Andy Kohler
that the XML I was retrieving from WorldCat really was encoded as UTF-8, which I hadn't accounted for so far. Wrapping my retrieved XML like so: utf8::encode($contents); has resolved the problem, so far at least - have to test more with records with diacritics to be sure. But this helps me mo

Re: Converting XML to MARC without reading a file?

2018-04-23 Thread Andy Kohler
Thanks to all for the additional comments / suggestions. My specific use case involves standard number searches of WorldCat. These generally return one record, but it's not guaranteed, which ruled out new_from_xml(). The syntax tweak to turn a scalar variable reference into a filehandle referenc