Does this help?

You start with xml2XMLRules pm973038.xml and then you're running on steriods ( XML::Rules is XML::Simple on steriods )

#!/usr/bin/perl -- #~ 2012-05-29-09:18:14 by Anonymous Monk #~ perltidy -csc -otr -opr -ce -nibc -i=4 use strict; use warnings; use XML::Rules; use Data::Dump qw/ dd /; @ARGV or die "Usage: pm973038.pl pm973038.xml\n"; Main( @ARGV ); exit( 0 ); sub Main { my( $xmlfile ) = @_; my $t = XML::Rules->new( qw/ stripspaces 8 /, rules => [ 'bad_info,bar_number,foo_datum,good_info,timestamp,ugly_info,unique_id +entifier' => 'content', 'bar,foo,thing' => 'as array no content', 'bad,bars,eggsmell,foos,good,things,ugly' => 'no content' ], ); my $res = $t->parsefile( $xmlfile ); dd $res; } ## end sub Main __END__ $ perl pm973038.pl pm973038.xml | perltidy { eggsmell => { things => { thing => [ { bars => { bar => [ { bad => { bad_info => -1.5 }, bar_number => 0, good => { good_info => -118 }, ugly => { ugly_info => 7.5 }, }, { bad => { bad_info => 0 }, bar_number => 1, ugly => { ugly_info => 3.5 } }, ], }, foos => { foo => [ { foo_datum => "ABC" }, { foo_datum => "XY +Z" } ] }, unique_identifier => 23456, }, { bars => { bar => [ { bad => { bad_info => -1.5 }, bar_number => 0, good => { good_info => -116 }, ugly => { ugly_info => 7.5 }, }, { bad => { bad_info => 0 }, bar_number => 1, ugly => { ugly_info => 3.5 } }, ], }, foos => { foo => [ { foo_datum => "SOS" }, { foo_datum => "FM +L" } ] }, unique_identifier => 23458, }, ], }, timestamp => "2011-05-09 23:05:33", }, }

In reply to Re: I (Think I) Need to Break Up with XML::Simple and I Don't Know Where to Turn by Anonymous Monk
in thread I (Think I) Need to Break Up with XML::Simple and I Don't Know Where to Turn by Randomice

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.