> <LabelResponse>
>> <Label>
>> <Image Number="1">base64datahere</Image>
>> <Image Number="2">base64datahere</Image>
>> <Image Number="3">base64datahere</Image>
>> </Label>
>> </LabelResponse>
>>
>> I need to be able to grab the correct set of base64 data.  Does anyone
>> know how to do that?

It's a common practice, to avoid using XML::Simple. It's also a common
practice not to give practical suggestions. Since you *did* ask for
XML::Simple, I went ahead and made a small example of how it would be
used in such a case. Now, keep in mind I don't know whether your XML
file is only what you pasted, or whether it is larger, or more complex

#!/usr/bin/perl

use strict;
use warnings;
use XML::Simple;

my $data = XMLin($path_to_file);

foreach my $image (@{$data->{Label}->{Image}}) {
        print "$image->{content}\n";
}

Gives out

base64datahere
base64datahere
base64datahere

-- 
Erez

"The government forgets that George Orwell's 1984 was a warning, and
not a blueprint"
http://www.nonviolent-conflict.org/ -- http://www.whyweprotest.org/

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to