XML::Simple ... it is simple, and sometimes functional XML requirements are simple, too

Sorry, but I have to strongly recommend against XML::Simple for any XML output, and don't even think about trying to round-trip XML files with XML::Simple. Reading simple XML files with the module might be acceptable if and only if the user is aware of all of the issues, but most people who come here to ask for help with XML::Simple are clearly not aware of those issues, and that's a problem with that module. Despite the fact that I really like the idea behind the module, unfortunately XML::Simple's output format is just too brittle and most XML schemas are too strict for the module to be a reliable XML writer.

XML::Rules is a pretty good replacement for XML::Simple for reading XML files into data structures, but I've noticed it's also still not always able to perfectly round-trip XML files. Personally, for writing XML files, I usually find myself using XML::LibXML (despite the relative verbosity of its API, since a few short helper subs take care of that), and for reading or filtering XML files, especially large ones, XML::Twig.


In reply to Re^2: Recomendations for a XML writer module by haukex
in thread Recomendations for a XML writer module by salva

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.