Re: Converting XML to MARC without reading a file?
[email protected] (Karl Billeter) Thu, 19 Apr 2018 10:34:19 +1000
| Newsgroups | perl.perl4lib |
|---|---|
| Message-ID | <20180419003419.ww7ibvxlthvcaydx@redgum> |
On Thu, Apr 19, 2018 at 12:25:05AM +0000, Andy Kohler wrote: > Problem: Converting from MARCXML via MARC::File::XML seems to require > reading the records from a file. I've already got the XML stored in a > variable, retrieved via LWP::Simple->get(). > > Do I have to write the XML to a file, then read it in again to convert it? > Or am I just missing something obvious? Looking at the module documentation new_from_xml() should work but only for a single record chunk. I'd probably use that and something like XML::Twig to split the records. K