I have an XML File that looks (in part - this section is several levels down) like:
'Size' => 'Single',
'ProductGroup' => 'Products',
'Feature' => [
'Blah Blah Blah',
'Blah Blah Blah',
'Blah Blah Blah',
'Blah Blah Blah',
],
etc.
When I parse the file that is received, I can gain access to Size, and Product group with this code using XML Parser:
my $size = $xml->{Items}->{Item}->{ItemAttributes}->{Size};
my $group = $xml->{Items}->{Item}->{ItemAttributes}->{ProductGroup};
The problem I am experiencing is that when I pull the Features using the same technique, I get an array back. I have tried to parse this array with a SPLIT command:
my @feat = $xml->{Items}->{Item}->{ItemAttributes}->{Feature};
($feats1,$feats2,$feats3,$feats4,$feats5) = split (/,/, @feat);
I cannot seem to do anything with the data that I receive, and when I turn the @feat into a standard $feat = $xml->{Items}-> ... and try to print the result, all I get is ARRAY{...}
I know that this has to be simple, and I am just overlooking it, but can anyone else help with this?
Thanks
'Size' => 'Single',
'ProductGroup' => 'Products',
'Feature' => [
'Blah Blah Blah',
'Blah Blah Blah',
'Blah Blah Blah',
'Blah Blah Blah',
],
etc.
When I parse the file that is received, I can gain access to Size, and Product group with this code using XML Parser:
my $size = $xml->{Items}->{Item}->{ItemAttributes}->{Size};
my $group = $xml->{Items}->{Item}->{ItemAttributes}->{ProductGroup};
The problem I am experiencing is that when I pull the Features using the same technique, I get an array back. I have tried to parse this array with a SPLIT command:
my @feat = $xml->{Items}->{Item}->{ItemAttributes}->{Feature};
($feats1,$feats2,$feats3,$feats4,$feats5) = split (/,/, @feat);
I cannot seem to do anything with the data that I receive, and when I turn the @feat into a standard $feat = $xml->{Items}-> ... and try to print the result, all I get is ARRAY{...}
I know that this has to be simple, and I am just overlooking it, but can anyone else help with this?
Thanks