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%       --