Help for this page

Select Code to Download


  1. or download this
    <?xml version="1.0" encoding="utf-8"?>
    <get_devices_response>
        <devices list="true">
    ...
            </device>
        </devices>
    </get_devices_response>
    
  2. or download this
    $VAR1 = {
              'devices' => {
                           'device' => [
    ...
                           'list' => 'true'
                         }
            };
    
  3. or download this
    my $hash_ref = XMLin($XML, KeyAttr=>[] , ForceArray=>["device"]);
    print "The array\n";
    print Dumper($hash_ref->{devices}->{device});
    ...
    print "The first element another way\n";
    my @array=$hash_ref->{devices}->{device};
    print Dumper($array[0]);
    
  4. or download this
    The array
    $VAR1 = [
              {
    ...
                'id' => '8765'
              }
            ];