I second what psini says. XML::Simple considered harmful. This is the normal lifecycle with it-

  1. You need an XML module... Let's check CPAN.
  2. Wow, XML::Parser, XML::LibXML, XML::Compile, XML::Twig... Yikes. This could take hours to learn one of these. Oh, hey! XML::Simple.
  3. That worked great!
  4. Oh, but you need it a little different. So just read the XML::Simple docs. It should be simple to change.
  5. ...Hours go by...
  6. ...Things are thrown...
  7. ...Questions are asked at SOPW...
  8. Someone mentions several older threads and trying a search first next time.
  9. You end up getting one of the fully featured modules.
  10. You spend about as much time learning it as you already flushed fighting XML::Simple over whether your data are elements or attributes.
  11. Now you have a real skill with a powerful tool and if you picked something with a DOM standards interface like LibXML, you also just picked up a bunch of transferable skills like hacking JS.

For my own part, I find XML::LibXML, XML::Compile, XML::Twig to be the sweet spots.


In reply to Re: XML Module by Your Mother
in thread XML Module by Sporti69

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.