The reason people choose XML::Simple over XML::LibXML is not the cleanliness of the code when already written, but rather the expected time to learn either so that you can write anything. I can't imagine anyone not feeling intimidated by the XML::LibXML docs. I just reread the main docs and, after many years of using Perl and being the author of one of the other modules already mentioned, I have no idea whatsoever how to use it or where to start looking.

I know I'm supposed to binmode() the filehandles I pass it, I know it supports threads, I know how to print the module's version and that's it.

I'm not surprised beginners do not use that module, I'm surprised anyone does.

I don't think there are reasons to use XML::Simple (see Simpler than XML::Simple), but except in case you already have code using libxml in some other language and just need to transform it into Perl, I do not see a reason to learn and use XML::LibXML either.

Jenda
Enoch was right!
Enjoy the last years of Rome.


In reply to Re: Examples where XML::Simple is the optimal choice? by Jenda
in thread Examples where XML::Simple is the optimal choice? by Preceptor

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.