Monks Apologies moritz.
So I have had a look at the XML::Simple troubles and am now using forcearray so that when debugging and printing the contents of the $parse I have this returned:
0 HASH(0x65deac0) 'Document' => HASH(0x65df390) 'ExtendedData' => HASH(0x661ddb0) 'GforS:Copyright' => "\cJ\cI\cI <p>All Images and Text are Co +pyright (c) The Gazetteer for Scotland 1995-2008 </p>\cJ\cI " 'xmlns:GforS' => 'http://www.geo.ed.ac.uk/scotgaz/' 'Placemark' => ARRAY(0x65e30f0) 0 HASH(0x65fdda0) 'Link' => 'http://www.geo.ed.ac.uk/scotgaz/features/featur +efirst16994.html ' 'LookAt' => HASH(0x660fc30) 'heading' => 0 'latitude' => 55.94218 'longitude' => '-3.17876' 'range' => 2000 'tilt' => 75 'Point' => HASH(0x66195c0) 'coordinates' => '-3.17876,55.94218,0' 'id' => 'g16994' 'description' => "A small harled five-bay mansion lying ga +ble-on to St Leonard's Street in S Central Edinburgh, Hermits and Ter +mits was built in 1734 for William Clifton, a Solicitor of Excise. It + took its name from the poetic-slang for a pair of crofts, <i>Hermiti +s</i> and <i>Terraris</i>, which can be traced back to at least the 1 +5th century and were associated with the St Leonard's Almshouses.\cJ\ +cJHermits and Termits was restored in 1982, an early project by local + architect Ben Tindall, to form his own residence. The interior is pa +nelled and the staircase features a fine mahogany balustrade.\cJ<p><a + href=\"http://getamap.ordnancesurvey.co.uk/getamap/frames.htm?mapAct +ion=zoomabs&mapX=326472&mapY=672772&zoomLevel=6&isGeo=y\">SHOW OS MAP +</a>,</p>\cJ <p><a href=\"http://www.geo.ed.ac.uk/scotgaz/\cJ \ +cI\cIfeatures/featurefirst16994.html\"//" 'extra' => HASH(0x6627c30) 'Point' => HASH(0x6627f00) 'id' => 'g16994' 'pos' => '326472,672772' 'srsName' => 'EPSG27700' 'typea' => 'House, Mansion or Palace' 'typeb' => 'Historic Building' 'typec' => HASH(0x6606ae0) empty hash 'xmlns:gml' => 'http://www.opengeospatial.org/standards +/gml' 'name' => ARRAY(0x66021f0) 0 ' Hermits and Termits ' 'styleUrl' => '#SGStyle' 1 HASH(0x660f7f0) 'Link' => 'http://www.geo.ed.ac.uk/scotgaz/features/featur +efirst8976.html ' 'LookAt' => HASH(0x6606ce0) 'heading' => 0 'latitude' => 55.94367 'longitude' => '-3.17606' 'range' => 2000 'tilt' => 75 'Point' => HASH(0x6606bd0) 'coordinates' => '-3.17606,55.94367,0' 'id' => 'g8976' 'description' => "A road which largely encircles the hills + within Edinburgh's Holyrood Park, the Queen's Drive is known as one +of the finest carriage drives in Europe. From its lowest point to the + east of Palace of Holyroodhouse, the road rises sharply onto the eas +tern and southern flanks of Arthur's Seat (251m / 823 feet). The high +er portions give spectacular views over the city.\cJ<p><a href=\"http +://getamap.ordnancesurvey.co.uk/getamap/frames.htm?mapAction=zoomabs& +mapX=326643&mapY=672943&zoomLevel=6&isGeo=y\">SHOW OS MAP</a>,</p>\cJ + <p><a href=\"http://www.geo.ed.ac.uk/scotgaz/\cJ \cI\cIfeature +s/featurefirst8976.html\"//" 'extra' => HASH(0x66072c0) 'Point' => HASH(0x6616040) 'id' => 'g8976' 'pos' => '326643,672943' 'srsName' => 'EPSG27700' 'typea' => 'Road or Street' 'typeb' => HASH(0x6616320) empty hash 'typec' => HASH(0x66161f0) empty hash 'xmlns:gml' => 'http://www.opengeospatial.org/standards +/gml' 'name' => ARRAY(0x65e3b00) 0 ' Queen\'s Drive ' 'styleUrl' => '#SGStyle' 2 HASH(0x66196f0) 'Link' => 'http://www.geo.ed.ac.uk/scotgaz/features/featur +efirst7848.html ' 'LookAt' => HASH(0x6616350) 'heading' => 0 'latitude' => 55.94126 'longitude' => '-3.18151' 'range' => 2000 'tilt' => 75 'Point' => HASH(0x6606f30) 'coordinates' => '-3.18151,55.94126,0' 'id' => 'g7848' 'description' => "Located on the west side of Clerk Street +, in the Newington District of Edinburgh, the Queen's Hall represents + the principal venue on the south-side of the city for concerts. Buil +t in 1823 as the Hope Park Chapel of Ease, the building has a two-sto +rey villa frontage, with a tall and slender classical steeple. Latter +ly the Newington and St. Leonard's Church, it was converted into a co +ncert hall in 1979, and opened by Her Majesty Queen Elizabeth II, the + 850-seat auditorium still strongly reflects its ecclesiastical origi +ns, although the pulpit has been replaced by an early 19th Century ch +amber organ. Painted 18th Century panels displaying the Commandments +and the Lord's Prayer, which were brought from the former Buccleuch P +arish Church in 1950, can be seen on the stairs.\cJ\cJNoted particula +rly for its baroque and classical music concerts, the Hall is home to + the world-class Scottish Chamber Orchestra, but also offers a progra +mme of jazz, folk and contemporary music, in addition to theatre, com +edy and opera as well as acting as an important venue for the Edinbur +gh International Festival.\cJ<p><a href=\"http://getamap.ordnancesurv +ey.co.uk/getamap/frames.htm?mapAction=zoomabs&mapX=326298&mapY=672698 +&zoomLevel=6&isGeo=y\">SHOW OS MAP</a>,</p>\cJ <p><a href=\"http:/ +/www.geo.ed.ac.uk/scotgaz/\cJ \cI\cIfeatures/featurefirst7848.html +\"//" 'extra' => HASH(0x6616930) 'Point' => HASH(0x6616c00) 'id' => 'g7848' 'pos' => '326298,672698' 'srsName' => 'EPSG27700' 'typea' => 'Entertainment Venue' 'typeb' => 'Historic Building' 'typec' => HASH(0x6616de0) empty hash 'xmlns:gml' => 'http://www.opengeospatial.org/standards +/gml' 'name' => ARRAY(0x65e3b70) 0 ' Queen\'s Hall, The ' 'styleUrl' => '#SGStyle' 3 HASH(0x6606f20) 'Link' => 'http://www.geo.ed.ac.uk/scotgaz/features/featur +efirst7865.html ' 'LookAt' => HASH(0x6616f40) 'heading' => 0 'latitude' => 55.94259 'longitude' => '-3.17992' 'range' => 2000 'tilt' => 75 'Point' => HASH(0x6616b20) 'coordinates' => '-3.17992,55.94259,0' 'id' => 'g7865' 'description' => "A small district of S Central Edinburgh, + St Leonard's lies a mile (1.5 km) south southeast of the city centre +. The area represented land granted to Holyrood Abbey by King David I + (c.1080 - 1153), and while once being much larger, today is constrai +ned between Holyrood Park Road in the south and Dumbiedykes and the P +leasance in the north. Once associated with brewing, St. Leonard's St +ation was also the terminus of the Innocent Railway. St Leonard's Sch +ool (1879) is now converted into private flats. The Police Headquarte +rs for Central Edinburgh ('A' Division) is located in the modern St. +Leonard's Police Station.\cJ<p><a href=\"http://getamap.ordnancesurve +y.co.uk/getamap/frames.htm?mapAction=zoomabs&mapX=326400&mapY=672800& +zoomLevel=6&isGeo=y\">SHOW OS MAP</a>,</p>\cJ <p><a href=\"http:// +www.geo.ed.ac.uk/scotgaz/\cJ \cI\cIfeatures/featurefirst7865.html\ +"//" 'extra' => HASH(0x661d8f0) 'Point' => HASH(0x661dbc0) 'id' => 'g7865' 'pos' => '326400,672800' 'srsName' => 'EPSG27700' 'typea' => 'Urban District' 'typeb' => HASH(0x661dea0) empty hash 'typec' => HASH(0x661dd70) empty hash 'xmlns:gml' => 'http://www.opengeospatial.org/standards +/gml' 'name' => ARRAY(0x65e3cc0) 0 ' St Leonard\'s ' 'styleUrl' => '#SGStyle' 'name' => ARRAY(0x661e150) 0 'Gazetteer for Scotland: Settlements' 'open' => 0 'xmlns' => 'http://earth.google.com/kml/2.0'
This encourages me as it appears that I now have a hash of which contains an array of Placemarks and each object in the array (of Placemark) contains a hash(?).

However I still have the problem that when I try to get the info out of the hash, nothing is returned.
I tried the use of @places both exactly as you suggested and then substituting $place for @places both time with errors.

I can understand what is being attempted, namely that you are looking to put the array of Placemarks into an array and then loop through the array and taken values out of the hash contained within?

All help is great, thanks monks
Niall


In reply to Re^2: Using KML in XML::Simple by carterniall
in thread Using KML in XML::Simple by carterniall

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.