Just another Perl shrine | |
PerlMonks |
Re: Determine the structure of an XML documentby kcott (Archbishop) |
on May 13, 2014 at 03:04 UTC ( [id://1085859]=note: print w/replies, xml ) | Need Help?? |
G'day bangor, While I'm not a huge fan of XML::Simple for general XML work, it may suit your needs with minimal coding such as this:
Here's an example of the output using the sample XML you provided.
That seems fairly close to the "simple text representation' you're after. See the XML::Simple documentation for how to tweak that output. Just for completeness, I generated that output using a here-doc with the XML you posted. The code's in the spoiler for those interested. <Reveal this spoiler or all in this thread>
-- Ken
In Section
Seekers of Perl Wisdom
|
|