Hi,

I'm getting a weird problem with XML::Simple;

[Tue Feb 17 03:40:51 2009] import_attachments.cgi: Couldn't open encma +p iso-8859 -15.enc: [Tue Feb 17 03:40:51 2009] import_attachments.cgi: No such file or dir +ectory [Tue Feb 17 03:40:51 2009] import_attachments.cgi: at /usr/lib/perl5/ +vendor_per l/5.8.4/x86_64-linux/XML/Parser.pm line 187
I've tried 2 ways of approaching:
my $data; open(READIT,"<$file"); while (<READIT>) { $data .= $_; } close(READIT); my $ref = XMLin($data);


..and also;

my $ref = XMLin($file);

Please note, this XML format has a lot of accents and stuff in. For example:
<vacation id="1872" type="VACATION" countryCode="TR" city="Antalya" +dayCount="-7" nightCount="-8" advertiser="expedia" advertiserLogo="ht +tp://www.illicotravel.com/fr/img/affil/expedia.gif" departureCities=" +Bale/Mulhouse, Lyon, Marseille, Nantes, Toulouse" minDepartureDate="2 +009-02-21" maxDepartureDate="2009-03-22"> <minPrice date="2009-02-21" value="529.0" /> <maxPrice date="2009-02-21" value="639.0" /> <title>Club Kimeros Hôtel</title> <shortDescription>Club Kimeros H&amp;ocirc;tel, Pension : All incl +usive, Pays de destination : TURQUIE, Ville de destin...</shortDescri +ption> <extraInfo /> <smallImageUrl>http:\//www.anyway.com/imgVar/SJ/wsj/1/6/wsj16376.j +pg</smallImageUrl> <redirectionParams>vacationType=VACATION&amp;departureDelta=15&amp +;departureDate.day=21&amp;departureDate.monthYear=02-2009&amp;departu +reCity=&amp;destination=TR</redirectionParams> <link>c2l0ZVNlY3Rpb249dmFjYXRpb24mYWR2ZXJ0aXNlck5hbWU9ZXhwZWRpYSZ1 +cmw9aHR0cDovL3d3dy5kcGJvbHZ3Lm5ldC9jbGljay0yMDM4MDgwLTEwNDY5MTkzP3Vyb +D1odHRwJTNBJTJGJTJGcHJvbW9zZWpvdXJzLmV4cGVkaWEuZnIlMkZyZWRpci5hc3AlM0 +ZhZmZjaWQlM0RleHBlLkZSLjAwMi4wMDkuJTI1enMuJTI1emEuJTI1enAuY2F0YWxvZ3V +lJTI2U0VSVklDRV9JRCUzRFhGX0VYRlJTQiUyNk1PREUlM0RXU0pfQ09NUCUyNlNKUElE +JTNEMTIwMzY=</link> </vacation>


Any suggestions are much appreciated (I looked on google, and found some results - but most werd not in english)

TIA

Andy

In reply to Error with .xml file processing in XML::Simple by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.