artist,

your problem seems to be that you have HTML-encoded characters in your xml feed.

The problem is that the only HTML-encoded characters allowed in XML are & (&amp;), < (&lt;), and > (&gt;). Everything else has to be a Unicode character (E.g. &#8026;). Btw. not all Unicode characters are permitted to be used.

There is a way though to get around all of this: Get your data/characters encased in a CDATA tag.

Now back to your problems and a few solutions

  1. It seems that you get unvalid XML.
  2. To get around this you have two possibilities:
    • Go to your XML source and ask them to verify their XML before they give it to you.
    • Preparse the XML and use regular expressions to eiter replace the unvalid character entities, or encase the data in CDATA tags.

thanks
/oliver/

Update: removed 'either' from sentence without second option.


In reply to Re: XML::Simple exit problem by neuroball
in thread XML::Simple exit problem by artist

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.