Re: [Patch] Escape marc tag/code/indicators in Marc::File::XML

[email protected] (Dan Scott)
Newsgroups perl.perl4lib
Message-ID <[email protected]>
2008/10/29 Bill Erickson <[email protected]>:
> Hi all,
>
> I ran across some gnarly MARC data today, which contained, among other
> things, MARC codes of "<".  I realized that Marc::File::XML outputs the MARC
> tags, codes, and indicators without escaping them.  This results, in my
> case, in invalid XML like:
>
> <subfield code="<">France</subfield>
>
> It seems reasonable that, regardless of the (horrible) content of the MARC,
> marc::file::xml should produce valid XML.
>
> Attached is a patch to explicitly escape the values before inserting them
> into the XML document under construction.  I'm not sure if it's the best
> approach, but it got me up and running again.
>
> Thanks,

Is anyone planning on applying this patch? It would be a shame to drop
it on the floor.

-- 
Dan Scott
Laurentian University
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.