Help for this page

Select Code to Download


  1. or download this
    $tree -> parse_file ($file); # $tree is a XML::TreeBuilder
    my @results = $tree -> look_down ('attr' => 'value');
    
  2. or download this
    timethis (5000, sub {$tree -> parse_file ($file)});
    timethis 5000: 16 wallclock secs (12.98 usr +  1.41 sys = 14.39 CPU) @
    + 347.46/s (n=5000)
    
  3. or download this
    timethis (5000, sub {my @results = $tree -> look_down('attr' => 'value
    +')});
    timethis 5000:  2 wallclock secs ( 1.42 usr +  0.00 sys =  1.42 CPU) @
    + 3516.17/s (n=5000)
    
  4. or download this
    timethis (500, sub {$tree -> parse_file ($file); my @results = $tree -
    +> look_down('attr'=> 'value')});
    timethis 500: 36 wallclock secs (34.32 usr +  0.19 sys = 34.51 CPU) @ 
    +14.49/s (n=500)