I think the problem is that there just isn't a 1:1 way to do this. This is why XML::Simple gets so hairy. Consider-
<container>
<thing foo="bar">baz</thing>
<thing qux="oop" foo=""/>
<thing/>
</container>
What could that look like in a Perl structure? It would have to have objects mimicking DOM or something like "content/children" named placeholders.
So, I don't think this is easy to solve and it will probably be messy or just a different API to the DOM that's almost as complicated. I'd love to be proved wrong in this case. :) I'm an XML::LibXML user that also would love having straight mapping to Perl structures now and then.
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.