Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Is it wiser to move on from XML::Simple to XML::Compile

by mohan2monks (Beadle)
on Jan 27, 2014 at 07:46 UTC ( #1072179=perlquestion: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use XML::LibXML;
    use XML::Fast;
    ...
        xmlsimple => sub { XML::Simple->new(ForceArray => 0, KeyAttr    =>
    + {})->XMLin($doc); },
        xmlcompile =>    sub {my $hash = $reader->("$doc");},
    };
    
  2. or download this
                 Rate xmlcompile  xmlsimple    xmlbare    xmlfast     libx
    +ml
    xmlcompile 51.5/s         --       -66%       -97%       -97%       -9
    +7%
    ...
    xmlbare    1651/s      3107%      1006%         --       -11%       -1
    +1%
    xmlfast    1846/s      3487%      1137%        12%         --        -
    +0%
    libxml     1846/s      3487%      1137%        12%         0%         
    +--
    
  3. or download this
        use XML::Hash::LX;
        # Usage with XML::LibXML
    ...
            my $item = xml2hash($_);
            print Dumper+$item
        }
    
  4. or download this
    Parse benchmark:
    
    ...
        Twig     13.5/s      19%      16%       --     -34%     -96%
        Hash::LX 20.3/s      79%      75%      51%       --     -95%
        Bare      370/s    3162%    3088%    2650%    1721%       --
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1072179]
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2014-12-17 23:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (40 votes), past polls