Heydly ho.

I'm using XML::Simple to parse some XML data, and it works so fine on my Mac Panther OSX with XML::Simple 2.11. When I upload the same file however onto a Linux Red Hat ES box with XML::Simple 2.12, it doesn't parse the data at all.

I am wondering if there is a difference in the version or something? do I have to downgrade? The XML::Parser on the Linux Red Hat ES box works fine with all the other xml I have thrown at it do far, but this one just returns nothing.

Here is the xml:

<?xml version="1.0"?> <rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:photo="http://www.pheed.com/pheed/" > <channel> <title>title</title> <description>desc</description> <language>en-us</language> <lastBuildDate>Fri, 23 Jul 2004 07:31:15 GMT</lastBuildDate> <image> <url>url</url> <link>link</link> </image> <item> <title>Titel</title> <link>link</link> <guid isPermaLink="false">5001811502</guid> <description></description> <photo:imgsrc>imgsrc</photo:imgsrc> <photo:thumbnail>thumbnail</photo:thumbnail> <dc:creator>creator</dc:creator> <dc:rights>rights</dc:rights> <dc:subject>subject</dc:subject> </item> </rss>

And the code:

my $xml = eval { XMLin($xml_results) } or die(@$); print Dumper($xml);

On one machine this formats a nice refrence to the xml object. On the other it outputs "undef"

Any ideas? or should I just scrap XML::Simple?


In reply to XML::Simple version difference? 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.