spe31500 has asked for the wisdom of the Perl Monks concerning the following question:

Hi monks, First, sorry for my english (i'm french!) I use XMLout with option noescape because i want to escape by myself the special caracters as & < and so on ... But when i read my file with XMLin, & is translate to & on certain unix platform (Redhat CentOS), it is not the same on Redhat 5.0 ??? I search an idea to read my xml file without escape special caracters ..... Thanks for your help SPE
  • Comment on how xmlin dont escape specials characters

Replies are listed 'Best First'.
Re: how xmlin dont escape specials characters
by NetWallah (Canon) on Mar 11, 2013 at 17:14 UTC
    First - in the absence of explicit confirmation, I'm making the following assumptions:

    • You are using XML::Simple to parse XML
    • You are trying to process incoming XML that contains "&amp;" and expect that to remain intact
    • Same for "&lt;"
    • It works (i.e does NOT translate) on Redhat 4? CENTOS ? but does not work (i.e. translates escapes to a single character) on RedHat 5
    So - to help analyze the issue, please identify perl versions, and XML::Simple versions on these platforms.

                 Most people believe that if it ain't broke, don't fix it.
            Engineers believe that if it ain't broke, it doesn't have enough features yet.

      Yes for the 3 first points. It works (i.e does NOT translate) on Redhat5 with versions perl-5.8.8-10, perl-XML-simple-2.14-4, perl-XML-Parser-2.34-6 Its does not work (i.e translate) on CentOS with verions perl-5.10.1-119, perl-XML-Simple-2.18.6, perl-XML-Parser-2.36-7 I dont use Redhat4 Thanks