#!/usr/bin/perl
use warnings;
use strict;
use SOAP::Lite;
my $xml = <<'eof';
eof
my $som = SOAP::Deserializer->deserialize($xml);
for my $item ($som->dataof("/Envelope/Body/command/*")) {
print "got 'command' item '", $item->name(), "'\n";
my $i = 1;
for my $subitem ($som->dataof("/Envelope/Body/command/[$i]/*")) {
print "got 'command' subitem $i '", $subitem->name(), "'\n";
my $j = 1;
for my $subsubitem ($som->dataof("/Envelope/Body/command/[$i]/[$j]/*")) {
print "got 'command' subsubitem $i:$j '", $subsubitem->name(), "'\n";
$j++;
}
$i++;
}
}
####
Use of uninitialized value in print at /Users/ar/work/soap/clients/deserialize-test.pl line 30.
Use of uninitialized value in print at /Users/ar/work/soap/clients/deserialize-test.pl line 33.
Use of uninitialized value in print at /Users/ar/work/soap/clients/deserialize-test.pl line 30.
got 'command' item 'message'
got 'command' subitem 1 ''
got 'command' subsubitem 1:1 ''
got 'command' subitem 2 ''
####
got 'command' item 'message'
got 'command' subitem 1 'commands'
got 'command' subsubitem 1:1 'command'
got 'command' subitem 2 'time'