Help for this page

Select Code to Download


  1. or download this
    use XML::Simple;
    $xml = new XML::Simple( ForceArray => [qw( product color )]);
    ...
        print "  Cost: " . $products->{cost} . "\n";
        print "Colors: " . (join ", ", @{$products->{color}})."\n\n";
    }
    
  2. or download this
    <shelf>
        <product>
    ...
            <color>white</color>
        </product>
    </shelf>
    
  3. or download this
    Widget: widget1
    Rating: B
    ...
    Rating: S
      Cost: 0.50
    Colors: