From: KevinO on
Hi

I "inherited" a program which contains this line:
$a = $soap->call( $retrieveXmlList => @params )->result ;

I added:
print "$a\n" ;

Which produced:
HASH(0x50c5d4)

How do I proceed from here to see and parse the XML tree/data?

Thanks
KO
From: Matija Papec on
KevinO wrote:
> Hi
>
> I "inherited" a program which contains this line:
> $a = $soap->call( $retrieveXmlList => @params )->result ;
>
> I added:
> print "$a\n" ;
>
> Which produced:
> HASH(0x50c5d4)
>
> How do I proceed from here to see and parse the XML tree/data?

Most probably you don't need to parse anything, as $a already contain
final result from soap call.

use Data::Dumper;
print Dumper $a
From: KevinO on
On Apr 9, 9:40 am, Matija Papec <n...(a)yahoo.com> wrote:
> KevinO wrote:
> > Hi
>
> > I "inherited" a program which contains this line:
> > $a = $soap->call( $retrieveXmlList => @params )->result ;
>
> > I added:
> > print "$a\n" ;
>
> > Which produced:
> > HASH(0x50c5d4)
>
> > How do I proceed from here to see and parse the XML tree/data?
>
> Most probably you don't need to parse anything, as $a already contain
> final result from soap call.
>
> use Data::Dumper;
> print Dumper $a

Matija

Thanks for the quick response.
However, it seems that the Dumper returns only the last item in the
list.
It is very likely my ignorance in the subject.
So, if I may push it a bit...
1. How do I get everything from Dumper?
2. How would I use an XML parser here?

Many Thanks
KO
From: nolo contendere on
On Apr 9, 11:03 am, KevinO <kevin...(a)yahoo.com> wrote:
> On Apr 9, 9:40 am, Matija Papec <n...(a)yahoo.com> wrote:
>
>
>
> > KevinO wrote:
> > > Hi
>
> > > I "inherited" a program which contains this line:
> > > $a = $soap->call( $retrieveXmlList => @params )->result ;
>
> > > I added:
> > > print "$a\n" ;
>
> > > Which produced:
> > > HASH(0x50c5d4)
>
> > > How do I proceed from here to see and parse the XML tree/data?
>
> > Most probably you don't need to parse anything, as $a already contain
> > final result from soap call.
>
> > use Data::Dumper;
> > print Dumper $a
>
> Matija
>
> Thanks for the quick response.
> However, it seems that the Dumper returns only the last item in the
> list.

Why do you jump to this conclusion rather than guess that the thing
that Dumper is trying to dump only has the last item?

From: KevinO on
On Apr 9, 11:07 am, nolo contendere <simon.c...(a)fmr.com> wrote:
> On Apr 9, 11:03 am, KevinO <kevin...(a)yahoo.com> wrote:
>
>
>
> > On Apr 9, 9:40 am, Matija Papec <n...(a)yahoo.com> wrote:
>
> > > KevinO wrote:
> > > > Hi
>
> > > > I "inherited" a program which contains this line:
> > > > $a = $soap->call( $retrieveXmlList => @params )->result ;
>
> > > > I added:
> > > > print "$a\n" ;
>
> > > > Which produced:
> > > > HASH(0x50c5d4)
>
> > > > How do I proceed from here to see and parse the XML tree/data?
>
> > > Most probably you don't need to parse anything, as $a already contain
> > > final result from soap call.
>
> > > use Data::Dumper;
> > > print Dumper $a
>
> > Matija
>
> > Thanks for the quick response.
> > However, it seems that the Dumper returns only the last item in the
> > list.
>
> Why do you jump to this conclusion rather than guess that the thing
> that Dumper is trying to dump only has the last item?

I don't know Perl well enough and Dumper in particular. That leaves
me with only one option - make assumptions and respectfully ask for
help.

KO