yet another XML::Simple option

That's a joke right?

XML::Simple has two entry points and 29 parse time options -- most of which you will never use -- that are all documented on a single page.

XML::LibXML has 26 entrypoints and 40+ constructor options mentioned -- note: not "documented" -- on just the parser page. And there are hundreds more entrypoint 'mentions' plus innumerable importable constants scattered across another 31 more pages.

One of the major reasons people use config files is so that they can avoid having to make changes to running code when, say, a new IP address is assigned.

Just use the required parsing options from the get-go and no change is required.

Of course, if the input file specifications change during the life of the program, then you will have to change program.

But modifying one program line after a substantial modification to the file format is hardly onerous.

If you are trying to claim that you wouldn't have to modify your program that used LibXML for a similar change, you are kidding yourself.

What if the addition was:

<ip note="UNDER NO CIRCUMSTANCES USE THIS IP ON PAIN OF SUBSTANTIAL LE +GAL REPRISALS; INCLUDING EXTRADITION AND LIFE IMPRISONMENT">67.215.65 +.132</ip>

which your LibXML program will blithely process in just the same way as every other IP it finds -- including perhaps attempting to access it which may well be construed as attempted hacking in some quarters -- without noticing a thing.

Personally, I prefer that my program either ignored that IP or issued a warning or error. At least until I'd had a chance to see what changed.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

The start of some sanity?


In reply to Re^6: Is there any XML reader like this? by BrowserUk
in thread Is there any XML reader like this? by ashok.g

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.