Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9272389
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T15:51:57+00:00 2026-06-18T15:51:57+00:00

I have an xml(kml) with this structure: <Document> <Folder> <Folder> <name>A -</name> <Placemark> <name>Afghanistan</name>

  • 0

I have an xml(kml) with this structure:

<Document>
<Folder>
    <Folder>
        <name>A -</name>
        <Placemark>
            <name>Afghanistan</name>
            <description></description>
            <Style>
                <PolyStyle>
                    <color>aaffffff</color>
                    <colorMode>random</colorMode>
                </PolyStyle>
            </Style>
            <Polygon>
                <outerBoundaryIs>
                    <LinearRing>
                        <coordinates> 65.62729644775391,37.33319854736328,0 65.64692687988283,37.45888137817383,0</coordinates>
                    </LinearRing>
                </outerBoundaryIs>
            </Polygon>
        </Placemark>
        <Placemark>
            <name>Albania</name>

I am trying to get the name of each country and their coordinates and save them on arrays.
This one gives me “Placemark” for elementValue and “null” for urlValue.

if ([elementName isEqualToString:@"Placemark"]){
    NSString *urlValue=[attributeDict valueForKey:@"name"];

    NSLog(@"I just found a start tag for %@ %@",elementName,urlValue);

}

Should I use any other delegate? What I am doing wrong here?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T15:51:59+00:00Added an answer on June 18, 2026 at 3:51 pm

    <name> isn’t an attribute of <Placemark>, it’s a child element. You need to set a flag or some such method and wait for the parser to call the delegate again via parser:didStartElement:... with “name” as the elementName. You can turn the flag off again when you get to parser:didEndElement:... on “Placemark” in preparation for the next iteration.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this XML structure: <?xml version=1.0 encoding=UTF-8?> <kml xmlns=http://www.opengis.net/kml/2.2> <Document> <name>My Work</name> <Placemark>
I have a KML file with country borders <Document> ... <Folder> <name>Countries</name> <Style> <ListStyle>
I have XML document with this structure: <dipOrders> <interchangeInfo senderEdiCode=LSC58 senderEdiCodeQal=ZZ receiverEdiCode=15274 receiverEdiCodeQal=ZZ syntax=X12
I have XML that looks like this: <Parameter Name=parameter name Value=parameter value /> which
I have xml like this: <configurationData> <path name='b'> <path name='a'> <setting name='s1'> ![CDATA[XXXX]] </setting>
I have this xml result from calling the page getRout.php <?xml version=1.0 encoding=UTF-8?> <kml
I've got a kml file(essentially xml) which has a set of nodes; name, description,
I have xml file with such structure: ... <outer> ... <inner/> ... </outer> ...
I Have XML similar to this(omitted parts for brevity): <uformrecord> <state>Submitted</state> <created>2012-06-19T11:31:54</created> <updated>2012-06-19T11:32:13</updated> <id>53225sas3c1-d727-42cd-93a6-97cd778e5ee9</id>
I have XML in the form: <Books> <Book> <Name>Lord of the Rings</Name> </Book> <Book>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.