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 6141369
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T18:14:30+00:00 2026-05-23T18:14:30+00:00

my requirement is parse an xml file and display it in ipad.But i was

  • 0

my requirement is parse an xml file and display it in ipad.But i was totally confused how to parse this xml file,i am novice in xml parsing. kindly help me how to create array for it and how to display in ipad.Its a magazine news application ,any source code or sample applicatiom may help me.

  • 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-05-23T18:14:30+00:00Added an answer on May 23, 2026 at 6:14 pm

    There is a built in XML parsing class in iOS called NSXMLParser. As an init parameter it takes an NSData that is usually the data you get back from a web service. Assign yourself as its delegate and call [parser parse] and it will call your delegate when it encounters an element, when it finishes an element, etc. See documentation for the parser and its delegate protocol.

    If you have control over the structure of your XML, I’ve found it easier when it’s structured like this:

    <Element attr1='value1' attr2='value2' />
    

    instead of:

    <Element>
      <attr1>value1</attr1>
      <attr2>value2</attr2>
    </Element>
    

    The reason is that the callback for when it finds an element is:

    - (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName
      namespaceURI:(NSString *)namespaceURI
      qualifiedName:(NSString *)qualifiedName
      attributes:(NSDictionary *)attributeDict
    

    where attributes is a dictionary of the values, so in the above example, [attributes objectForKey:@"attr1"] would give you “value1” if it was structured in the first way. If it’s the second way, you end up doing lots of state management that’s a bit of a pain, especially if you’ve got elements within elements, etc.

    In addition to NSXMLParser thare are open-source parsers that either do everything themselves or wrap the built-in parser. I’ve written my own wrapper for it before. See here for a post on the subject (thanks to this question for the link).

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

Sidebar

Related Questions

my requirement is to parse xml data from the server side and display it
I have a requirement to parse/traverse an XML file using the YUI 2.8 library.
I have a requirement to both parse existing XML strings (retrieved from a database)
As per the requirement, I have parsed an XML file and set data into
We have a requirement to parse a file and write the data to an
i want to pick a perticular node from an XMl file and then parse
I'm parsing an XML file which can contain localized strings in different languages (at
I need to parse a bunch of incoming XML documents but it does not
My requirement is to compress xml file into a binary format, transmit it and
Possible Duplicate: Java API to parse XSD schema file I have a requirement to

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.