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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T05:12:04+00:00 2026-05-23T05:12:04+00:00

I have XML data parched in a NSMutableArray and i need to loop through

  • 0

I have XML data parched in a NSMutableArray and i need to loop through the array to see all values stored in it. This may be a stupid question but this is all new to me.

The xml file looks like this

<list>
<item id="1">
<title>Title 1</title>
<title>Content 1</title>
</item>
<item id="2">
<title>Title 2</title>
<title>Content 2</title>
</item>
</list>

This is the array that all data is collected

NSMutableArray *articleList=[[ArticleService getArticleList] retain];

If i output NSLog(@”articleList: %@”, articleList); on this is the result I get, so I guess there is some data inside of the array.

2011-06-14 21:51:04.690 NAF[954:207] articleList: (
"<Article: 0x8021170>",
"<Article: 0x80214a0>",
"<Article: 0x8020660>",
"<Article: 0x802ba30>",
"<Article: 0x802a520>",
"<Article: 0x80267a0>",
"<Article: 0x8025bd0>",
"<Article: 0x80141e0>",
"<Article: 0x8024390>",
"<Article: 0x8026bb0>",
"<Article: 0x8029630>",
"<Article: 0x8019390>",
"<Article: 0x8015b50>",
"<Article: 0x8014dd0>",
"<Article: 0x8012fb0>"
)

So to the question. How can I loop true the array and get the value of every ‘title’ of the XML file.
Im a hell of a cut and paste programmer, so if someone can be so helpful providing me with some code, I will appriciate it a lot.

  • 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-23T05:12:05+00:00Added an answer on May 23, 2026 at 5:12 am

    Assuming that each article has a property called title

    for(Article* a in articleList)
    {
        NSLog(@"Title = %@",a.title);
    {
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If I have the xml/html data to post we need to encode the data
I have a DataSet consisting of XML data, I can easily output this to
In this case I have XML data source and external images files whole together
I have XML data like this: <data ItemCount=5> <zrow GroupName=ManagerUser=User1 /> <zrow GroupName=DeveloperUser=User2 />
I have this XML data and try and make a sum of it using
I have this xml data format. I would like to extract the properties name
I have XML data that looks like this <?xml version=1.0 encoding=utf-8?> <root> <account var1=
I have some XML data stored in a varchar(max) column on SQL Server 2005.
suppose i have xml data stored in string variable. so when i am trying
Have a xml data like <Items><Item><name>test1</name></Item><Item><name>test2</name></Item></Items> Looks like jaxb cannot unmashall this when defining

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.