Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

While that is generally true, especially for generating XML files, i have yet to find another XML parser that is as simple and easy to use. XML::Rules is somewhat promising, but still adds a lot of extra complications.

When it comes to parsing config files, i generally don't give an f### if it validates against some XSD schema (and in usually don't bother to even create one). I don't need "sequential parsing" or "streaming" because of the file size. All i want to do is turn that file into a hashref. And i don't care about all the "advanced" XML stuff like namespaces. The only reason i'm not using JSON is because i find XML easier to read and write by hand.

For some time now i've been thinking of either forking XML::Simple (and rip out all the "write XML files" stuff) or writing a wrapper for something like XML::Rules that emulates the XML::Simple behaviour as close as possible. In my humble opinion, we really need a module that's as simple as XML::Simple, at least for reading XML config files. Basically the equivalent of simplicity to parsing a JSON file.

perl -e 'use Crypt::Digest::SHA256 qw[sha256_hex]; print substr(sha256_hex("the Answer To Life, The Universe And Everything"), 6, 2), "\n";'

In reply to Re^2: XML::Simple and ISO-8859-1 encoding buggy? by cavac
in thread XML::Simple and ISO-8859-1 encoding buggy? by derion

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2024-04-26 03:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found