inblosam has asked for the wisdom of the Perl Monks concerning the following question:
This returns me nothing, and I even get the fun uninitialized statement:#!/usr/bin/perl -w use strict; use XML::Simple; use Data::Dumper; my $content = XMLin(qq| <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envel +ope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http:// +www.w3.org/2001/XMLSchema-instance"> <soapenv:Header> <responseTime soapenv:actor="http://schemas.xmlsoap.org/soap/actor/n +ext" soapenv:mustUnderstand="0" xmlns="https://adwords.google.com/api +/adwords/v5">124</responseTime> <operations soapenv:actor="http://schemas.xmlsoap.org/soap/actor/nex +t" soapenv:mustUnderstand="0" xmlns="https://adwords.google.com/api/a +dwords/v5">1</operations> <units soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" so +apenv:mustUnderstand="0" xmlns="https://adwords.google.com/api/adword +s/v5">25</units> <requestId soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next +" soapenv:mustUnderstand="0" xmlns="https://adwords.google.com/api/ad +words/v5">123</requestId> </soapenv:Header> <soapenv:Body> <getKeywordVariationsResponse xmlns="https://adwords.google.com/api/ +adwords/v5"> <getKeywordVariationsReturn> <moreSpecific> <text>web content managment</text> <language>en</language> <advertiserCompetitionScale>3</advertiserCompetitionScale> <searchVolumeScale>1</searchVolumeScale> </moreSpecific> <moreSpecific> <text>web based content management</text> <language>en</language> <advertiserCompetitionScale>5</advertiserCompetitionScale> <searchVolumeScale>1</searchVolumeScale> </moreSpecific> <additionalToConsider> <text>3.14</text> <language>en</language> <advertiserCompetitionScale>3</advertiserCompetitionScale> <searchVolumeScale>2</searchVolumeScale> </additionalToConsider> <additionalToConsider> <text>babinet's</text> <language>en</language> <advertiserCompetitionScale>2</advertiserCompetitionScale> <searchVolumeScale>0</searchVolumeScale> </additionalToConsider> </getKeywordVariationsReturn> </getKeywordVariationsResponse> </soapenv:Body> </soapenv:Envelope> |); print "... $content->{'soapenv:Envelope'}{'soapenv:Body'}{'getKeywordV +ariationsResponse'}{'getKeywordVariationsReturn'}{'moreSpecific'}[0]- +>{'text'} ...\n"; #print Dumper(\$content);
Any ideas? Obviously I need what's in the text, advertiserCompetitionScale, and searchVolume tags, and I need to iterate through each occurrence. Any ideas?Use of uninitialized value in concatenation (.) or string at xmlparser +.pl line 54.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Trouble Getting Deep Into a Hash from XML::Parser
by runrig (Abbot) on Sep 02, 2006 at 07:12 UTC | |
by inblosam (Monk) on Sep 02, 2006 at 12:37 UTC | |
by runrig (Abbot) on Sep 02, 2006 at 17:36 UTC | |
by inblosam (Monk) on Sep 02, 2006 at 08:34 UTC |