Iam trying to parse xml file using SAX Pasrser in Perl but I have problem which is a duplicate in xml results Iam trying to parse the below xml
<?xml version="1.0" encoding="UTF-8"?> <XMLResponse> <ResponseType>HotelListResponse</ResponseType> <RequestInfo> <AffiliateCode>NI9373</AffiliateCode> <AffRequestId>2</AffRequestId> <AffRequestTime>2015-10-29T15:52:05</AffRequestTime> </RequestInfo> <TotalNumber>264234</TotalNumber> <Hotels> <Hotel> <HotelCode>AD0BFU</HotelCode> <OldHotelId>0</OldHotelId> <DestinationId>AF6Z</DestinationId> <Destination>Andorra La Vella</Destination> <Country>Andorra</Country> <HotelName>Bringue</HotelName> <StarRating>3</StarRating> <HotelAddress>General Del Serrat</HotelAddress> <HotelPostalCode>AD 300</HotelPostalCode> <HotelPhoneNumber>00376.736999</HotelPhoneNumber> <HotelArea/> <Chain/> <Coordinates> <Latitude>42.620302</Latitude> <Longitude>1.539588</Longitude> </Coordinates> <HotelImages> <ImageURL>http://image.metglobal.com/hotelimages/AD0BFU/8601444_0x0.jpg</ImageURL> <ImageURL>http://image.metglobal.com/hotelimages/AD0BFU/8601901_0x0.jpg</ImageURL> <ImageURL>http://image.metglobal.com/hotelimages/AD0BFU/8601472_0x0.jpg</ImageURL> <ImageURL>http://image.metglobal.com/hotelimages/AD0BFU/8601945_0x0.jpg</ImageURL> <ImageURL>http://image.metglobal.com/hotelimages/AD0BFU/8601498_0x0.jpg</ImageURL> <ImageURL>http://image.metglobal.com/hotelimages/AD0BFU/8601525_0x0.jpg</ImageURL> <ImageURL>http://image.metglobal.com/hotelimages/AD0BFU/8601554_0x0.jpg</ImageURL> <ImageURL>http://image.metglobal.com/hotelimages/AD0BFU/8601580_0x0.jpg</ImageURL> <ImageURL>http://image.metglobal.com/hotelimages/AD0BFU/8601607_0x0.jpg</ImageURL> <ImageURL>http://image.metglobal.com/hotelimages/AD0BFU/8601635_0x0.jpg</ImageURL> </HotelImages> </Hotel> </Hotels> </XMLResponse> Iam using this part of code to read the result from the above xml file
package hotelsHandler; use Data::Dumper; my $current_element = ''; my $text = ''; my @ResultSet = undef; my $i = 0; my $inContract = 0; my $hotelsCount = 0; sub new { my $self = shift; $ResultSet = shift; $i = 0; $imagesCount = 0; return bless {}, $self; } # start_element handler sub start_element { my ($self, $element) = @_; my $current_element = $element->{Name}; $current_element = $element->{Name}; } # characters handler sub characters { my ($self, $character_data) = @_; $text = $character_data->{Data}; } # end_element handler sub end_element { my ($self, $element) = @_; $current_element = $element->{Name}; #----- ServiceHotel ------------ if ($current_element eq 'Hotel'){ $i++; }elsif ($current_element eq 'HotelCode'){ $ResultSet[$i]{HotelCode} = $text; } elsif ($current_element eq 'OldHotelId'){ $ResultSet[$i]{OldHotelId} = $text; } elsif ($current_element eq 'DestinationId'){ $ResultSet{Hotels}[$i]{DestinationId} = $text; } elsif ($current_element eq 'Destination'){ $ResultSet{Hotels}[$i]{Destination} = $text; } elsif ($current_element eq 'Country'){ $ResultSet{Hotels}[$i]{Country} = $text; } elsif ($current_element eq 'Country'){ $ResultSet{Hotels}[$i]{Country} = $text; } elsif ($current_element eq 'HotelName'){ $ResultSet{Hotels}[$i]{HotelName} = $text; } elsif ($current_element eq 'StarRating'){ $ResultSet{Hotels}[$i]{StarRating} = $text; } elsif ($current_element eq 'HotelAddress'){ $ResultSet{Hotels}[$i]{HotelAddress} = $text; } elsif ($current_element eq 'HotelPostalCode'){ $ResultSet{Hotels}[$i]{HotelPostalCode} = $text; } elsif ($current_element eq 'HotelPhoneNumber'){ $ResultSet{Hotels}[$i]{HotelPhoneNumber} = $text; } elsif ($current_element eq 'HotelArea'){ $ResultSet{Hotels}[$i]{HotelArea} = $text; } elsif ($current_element eq 'Chain'){ $ResultSet{Hotels}[$i]{Chain} = $text; } #-------- Contracts ----------- elsif ($current_element eq 'HotelImages'){ $imageCount = 0; } elsif ($current_element eq 'ImageURL') { $ResultSet{Hotels}[$i]{Images}[$imageCount]{imageURL} = $text; $imageCount++; } elsif ($current_element eq 'Latitude'){ $ResultSet{Hotels}[$i]{Latitude} = $text; } elsif ($current_element eq 'Longitude'){ $ResultSet{Hotels}[$i]{Longitude} = $text; } print Dumper (\%ResultSet); saveHotelDetails(\%ResultSet); $text=''; } And this is the handler execution
use XML::SAX; use hotelsHandler; my $parser = XML::SAX::ParserFactory->parser( Handler => hotelsProHandler->new ); $parser->parse(Handler => hotelsProHandler->new, Source => { SystemId => SaveXmlPath."/hotel_details.xml" }); But it return result as following
VAR1 = {}; $VAR1 = {}; $VAR1 = {}; $VAR1 = {}; $VAR1 = {}; $VAR1 = {}; $VAR1 = {}; $VAR1 = {}; $VAR1 = { 'Hotels' => [ { 'DestinationId' => 'AF6Z' } ] }; $VAR1 = { 'Hotels' => [ { 'DestinationId' => 'AF6Z', 'Destination' => 'Andorra La Vella' } ] }; $VAR1 = { 'Hotels' => [ { 'DestinationId' => 'AF6Z', 'Country' => 'Andorra', 'Destination' => 'Andorra La Vella' } ] }; $VAR1 = { 'Hotels' => [ { 'DestinationId' => 'AF6Z', 'HotelName' => 'Bringue', 'Country' => 'Andorra', 'Destination' => 'Andorra La Vella' } ] }; $VAR1 = { 'Hotels' => [ { 'DestinationId' => 'AF6Z', 'HotelName' => 'Bringue', 'Country' => 'Andorra', 'StarRating' => '3', 'Destination' => 'Andorra La Vella' } ] }; $VAR1 = { 'Hotels' => [ { 'DestinationId' => 'AF6Z', 'HotelName' => 'Bringue', 'Country' => 'Andorra', 'StarRating' => '3', 'HotelAddress' => 'General Del Serrat', 'Destination' => 'Andorra La Vella' } ] }; $VAR1 = { 'Hotels' => [ { 'HotelPostalCode' => 'AD 300', 'DestinationId' => 'AF6Z', 'HotelName' => 'Bringue', 'Country' => 'Andorra', 'StarRating' => '3', 'HotelAddress' => 'General Del Serrat', 'Destination' => 'Andorra La Vella' } ] }; $VAR1 = { 'Hotels' => [ { 'HotelPhoneNumber' => '00376.736999', 'DestinationId' => 'AF6Z', 'HotelAddress' => 'General Del Serrat', 'Destination' => 'Andorra La Vella', 'HotelPostalCode' => 'AD 300', 'Country' => 'Andorra', 'HotelName' => 'Bringue', 'StarRating' => '3' } ] }; $VAR1 = { 'Hotels' => [ { 'HotelPhoneNumber' => '00376.736999', 'DestinationId' => 'AF6Z', 'HotelAddress' => 'General Del Serrat', 'Destination' => 'Andorra La Vella', 'HotelArea' => ' ', 'HotelPostalCode' => 'AD 300', 'Country' => 'Andorra', 'HotelName' => 'Bringue', 'StarRating' => '3' } ] }; $VAR1 = { 'Hotels' => [ { 'HotelPhoneNumber' => '00376.736999', 'DestinationId' => 'AF6Z', 'HotelAddress' => 'General Del Serrat', 'Destination' => 'Andorra La Vella', 'HotelArea' => ' ', 'HotelPostalCode' => 'AD 300', 'Chain' => ' ', 'Country' => 'Andorra', 'HotelName' => 'Bringue', 'StarRating' => '3' } ] }; $VAR1 = { 'Hotels' => [ { 'HotelPhoneNumber' => '00376.736999', 'DestinationId' => 'AF6Z', 'HotelAddress' => 'General Del Serrat', 'Destination' => 'Andorra La Vella', 'HotelArea' => ' ', 'Latitude' => '42.620302', 'HotelPostalCode' => 'AD 300', 'Chain' => ' ', 'Country' => 'Andorra', 'HotelName' => 'Bringue', 'StarRating' => '3' } ] }; $VAR1 = { 'Hotels' => [ { 'Longitude' => '1.539588', 'HotelPhoneNumber' => '00376.736999', 'DestinationId' => 'AF6Z', 'HotelAddress' => 'General Del Serrat', 'Destination' => 'Andorra La Vella', 'HotelArea' => ' ', 'Latitude' => '42.620302', 'HotelPostalCode' => 'AD 300', 'Chain' => ' ', 'Country' => 'Andorra', 'HotelName' => 'Bringue', 'StarRating' => '3' } ] }; $VAR1 = { 'Hotels' => [ { 'Longitude' => '1.539588', 'HotelPhoneNumber' => '00376.736999', 'DestinationId' => 'AF6Z', 'HotelAddress' => 'General Del Serrat', 'Destination' => 'Andorra La Vella', 'HotelArea' => ' ', 'Latitude' => '42.620302', 'HotelPostalCode' => 'AD 300', 'Chain' => ' ', 'Country' => 'Andorra', 'HotelName' => 'Bringue', 'StarRating' => '3' } ] }; $VAR1 = { 'Hotels' => [ { 'Longitude' => '1.539588', 'HotelPhoneNumber' => '00376.736999', 'DestinationId' => 'AF6Z', 'HotelAddress' => 'General Del Serrat', 'Destination' => 'Andorra La Vella', 'HotelArea' => ' ', 'Latitude' => '42.620302', 'HotelPostalCode' => 'AD 300', 'Chain' => ' ', 'Country' => 'Andorra', 'HotelName' => 'Bringue', 'StarRating' => '3', 'Images' => [ { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601444_0x0.jpg' } ] } ] }; $VAR1 = { 'Hotels' => [ { 'Longitude' => '1.539588', 'HotelPhoneNumber' => '00376.736999', 'DestinationId' => 'AF6Z', 'HotelAddress' => 'General Del Serrat', 'Destination' => 'Andorra La Vella', 'HotelArea' => ' ', 'Latitude' => '42.620302', 'HotelPostalCode' => 'AD 300', 'Chain' => ' ', 'Country' => 'Andorra', 'HotelName' => 'Bringue', 'StarRating' => '3', 'Images' => [ { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601444_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601901_0x0.jpg' } ] } ] }; $VAR1 = { 'Hotels' => [ { 'Longitude' => '1.539588', 'HotelPhoneNumber' => '00376.736999', 'DestinationId' => 'AF6Z', 'HotelAddress' => 'General Del Serrat', 'Destination' => 'Andorra La Vella', 'HotelArea' => ' ', 'Latitude' => '42.620302', 'HotelPostalCode' => 'AD 300', 'Chain' => ' ', 'Country' => 'Andorra', 'HotelName' => 'Bringue', 'StarRating' => '3', 'Images' => [ { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601444_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601901_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601472_0x0.jpg' } ] } ] }; $VAR1 = { 'Hotels' => [ { 'Longitude' => '1.539588', 'HotelPhoneNumber' => '00376.736999', 'DestinationId' => 'AF6Z', 'HotelAddress' => 'General Del Serrat', 'Destination' => 'Andorra La Vella', 'HotelArea' => ' ', 'Latitude' => '42.620302', 'HotelPostalCode' => 'AD 300', 'Chain' => ' ', 'Country' => 'Andorra', 'HotelName' => 'Bringue', 'StarRating' => '3', 'Images' => [ { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601444_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601901_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601472_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601945_0x0.jpg' } ] } ] }; $VAR1 = { 'Hotels' => [ { 'Longitude' => '1.539588', 'HotelPhoneNumber' => '00376.736999', 'DestinationId' => 'AF6Z', 'HotelAddress' => 'General Del Serrat', 'Destination' => 'Andorra La Vella', 'HotelArea' => ' ', 'Latitude' => '42.620302', 'HotelPostalCode' => 'AD 300', 'Chain' => ' ', 'Country' => 'Andorra', 'HotelName' => 'Bringue', 'StarRating' => '3', 'Images' => [ { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601444_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601901_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601472_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601945_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601498_0x0.jpg' } ] } ] }; $VAR1 = { 'Hotels' => [ { 'Longitude' => '1.539588', 'HotelPhoneNumber' => '00376.736999', 'DestinationId' => 'AF6Z', 'HotelAddress' => 'General Del Serrat', 'Destination' => 'Andorra La Vella', 'HotelArea' => ' ', 'Latitude' => '42.620302', 'HotelPostalCode' => 'AD 300', 'Chain' => ' ', 'Country' => 'Andorra', 'HotelName' => 'Bringue', 'StarRating' => '3', 'Images' => [ { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601444_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601901_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601472_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601945_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601498_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601525_0x0.jpg' } ] } ] }; $VAR1 = { 'Hotels' => [ { 'Longitude' => '1.539588', 'HotelPhoneNumber' => '00376.736999', 'DestinationId' => 'AF6Z', 'HotelAddress' => 'General Del Serrat', 'Destination' => 'Andorra La Vella', 'HotelArea' => ' ', 'Latitude' => '42.620302', 'HotelPostalCode' => 'AD 300', 'Chain' => ' ', 'Country' => 'Andorra', 'HotelName' => 'Bringue', 'StarRating' => '3', 'Images' => [ { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601444_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601901_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601472_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601945_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601498_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601525_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601554_0x0.jpg' } ] } ] }; $VAR1 = { 'Hotels' => [ { 'Longitude' => '1.539588', 'HotelPhoneNumber' => '00376.736999', 'DestinationId' => 'AF6Z', 'HotelAddress' => 'General Del Serrat', 'Destination' => 'Andorra La Vella', 'HotelArea' => ' ', 'Latitude' => '42.620302', 'HotelPostalCode' => 'AD 300', 'Chain' => ' ', 'Country' => 'Andorra', 'HotelName' => 'Bringue', 'StarRating' => '3', 'Images' => [ { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601444_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601901_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601472_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601945_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601498_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601525_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601554_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601580_0x0.jpg' } ] } ] }; $VAR1 = { 'Hotels' => [ { 'Longitude' => '1.539588', 'HotelPhoneNumber' => '00376.736999', 'DestinationId' => 'AF6Z', 'HotelAddress' => 'General Del Serrat', 'Destination' => 'Andorra La Vella', 'HotelArea' => ' ', 'Latitude' => '42.620302', 'HotelPostalCode' => 'AD 300', 'Chain' => ' ', 'Country' => 'Andorra', 'HotelName' => 'Bringue', 'StarRating' => '3', 'Images' => [ { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601444_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601901_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601472_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601945_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601498_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601525_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601554_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601580_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601607_0x0.jpg' } ] } ] }; $VAR1 = { 'Hotels' => [ { 'Longitude' => '1.539588', 'HotelPhoneNumber' => '00376.736999', 'DestinationId' => 'AF6Z', 'HotelAddress' => 'General Del Serrat', 'Destination' => 'Andorra La Vella', 'HotelArea' => ' ', 'Latitude' => '42.620302', 'HotelPostalCode' => 'AD 300', 'Chain' => ' ', 'Country' => 'Andorra', 'HotelName' => 'Bringue', 'StarRating' => '3', 'Images' => [ { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601444_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601901_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601472_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601945_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601498_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601525_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601554_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601580_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601607_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601635_0x0.jpg' } ] } ] }; $VAR1 = { 'Hotels' => [ { 'Longitude' => '1.539588', 'HotelPhoneNumber' => '00376.736999', 'DestinationId' => 'AF6Z', 'HotelAddress' => 'General Del Serrat', 'Destination' => 'Andorra La Vella', 'HotelArea' => ' ', 'Latitude' => '42.620302', 'HotelPostalCode' => 'AD 300', 'Chain' => ' ', 'Country' => 'Andorra', 'HotelName' => 'Bringue', 'StarRating' => '3', 'Images' => [ { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601444_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601901_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601472_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601945_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601498_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601525_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601554_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601580_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601607_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601635_0x0.jpg' } ] } ] }; $VAR1 = { 'Hotels' => [ { 'Longitude' => '1.539588', 'HotelPhoneNumber' => '00376.736999', 'DestinationId' => 'AF6Z', 'HotelAddress' => 'General Del Serrat', 'Destination' => 'Andorra La Vella', 'HotelArea' => ' ', 'Latitude' => '42.620302', 'HotelPostalCode' => 'AD 300', 'Chain' => ' ', 'Country' => 'Andorra', 'HotelName' => 'Bringue', 'StarRating' => '3', 'Images' => [ { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601444_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601901_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601472_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601945_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601498_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601525_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601554_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601580_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601607_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601635_0x0.jpg' } ] } ] }; $VAR1 = { 'Hotels' => [ { 'Longitude' => '1.539588', 'HotelPhoneNumber' => '00376.736999', 'DestinationId' => 'AF6Z', 'HotelAddress' => 'General Del Serrat', 'Destination' => 'Andorra La Vella', 'HotelArea' => ' ', 'Latitude' => '42.620302', 'HotelPostalCode' => 'AD 300', 'Chain' => ' ', 'Country' => 'Andorra', 'HotelName' => 'Bringue', 'StarRating' => '3', 'Images' => [ { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601444_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601901_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601472_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601945_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601498_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601525_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601554_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601580_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601607_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601635_0x0.jpg' } ] } ] }; $VAR1 = { 'Hotels' => [ { 'Longitude' => '1.539588', 'HotelPhoneNumber' => '00376.736999', 'DestinationId' => 'AF6Z', 'HotelAddress' => 'General Del Serrat', 'Destination' => 'Andorra La Vella', 'HotelArea' => ' ', 'Latitude' => '42.620302', 'HotelPostalCode' => 'AD 300', 'Chain' => ' ', 'Country' => 'Andorra', 'HotelName' => 'Bringue', 'StarRating' => '3', 'Images' => [ { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601444_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601901_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601472_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601945_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601498_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601525_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601554_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601580_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601607_0x0.jpg' }, { 'imageURL' => 'http://image.metglobal.com/hotelimages/AD0BFU/8601635_0x0.jpg' } ] } ] };
Anyone help me to solve this problem Is error in the code??
No comments:
Post a Comment