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.

Any chance of including a sample (horrible) MARC record to include in
a testcase?

I'm not saying I would build a testcase for MARC::File::XML, but I
might build one for File_MARC (PHP)... and a nice horrible MARC record
from the wild would help.

-- 
Dan Scott
Laurentian University

Reply via email to