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

  • Home
  • SEARCH
  • 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 3783704
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T11:15:54+00:00 2026-05-19T11:15:54+00:00

Sorry for such a confusing title but it’s hard to explain in a few

  • 0

Sorry for such a confusing title but it’s hard to explain in a few words what I’m trying to accomplish. I’ll try to explain the best I can. Ok, I’m parsing data from a xml file. It’s constructed like so:

<item1>
   <subitem1>text</subitem1>
   <subitem2>text</subitem2>
   <subitem3>text</subitem3>
   <subitem4>text</subitem4>
   <subitem5>text</subitem5>
</item1>
<item2>
   <subitem1>text</subitem1>
   <subitem2>text</subitem2>
   <subitem3>text</subitem3>
   <subitem4>text</subitem4>
   <subitem5>text</subitem5>
</item2>
<item3>
   <subitem1>text</subitem1>
   <subitem2>text</subitem2>
   <subitem3>text</subitem3>
   <subitem4>text</subitem4>
   <subitem5>text</subitem5>
</item3>
so on and so on...

So basically I want to display each item into a separate row in a UITableView and put each subitem into it’s parent’s row/cell as a label to display the info about it’s parent “item”.
Also, I need to be able to sort each item by one of it’s subitems i.e. let’s say subitem4. If subitem4 is equal to some string then it would display that item into the UITableView however if subitem4 isn’t equal to that string I compare it to then that item wouldn’t get displayed in the UITableView. As of right now I really don’t have any working code because I’m not sure how to go about making this work. I don’t know how I would do this because I have 1 array right now with all of the subitems together and I’m just separating each subitem and putting them into separate arrays so I can distinguish between each item row, I’m do it with the following code:

int totalNames = [Names count];
id name = [Names objectAtIndex:1];
[listOfItems addObject:name];

I’m pretty sure I’m going about this the wrong way. There must be a better way to do this logically. Any help or advice would be much appreciated. I’m mentally exhausted with this. Thanks.

  • 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-19T11:15:54+00:00Added an answer on May 19, 2026 at 11:15 am

    Use classes.

    Make each Item an instance of a class. make each subitem a property of the class. then have one array of the objects. then can sort based on a particular property or whatever.

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

Sidebar

Related Questions

Sorry if the title is poorly descriptive, but I can't do better right now
Sorry for such a lame title, but I just had no idea what to
Sorry for such general question, but what is the best (as fast as possible
I'm sorry for such a silly question, but I can not fathom the name
Sorry for such popular question, but, i don't need fill anything, i just need
Sorry for such a silly question, but sitting in front of the comp for
Sorry for such a vague question, but I have been searching around for the
Really sorry for the extremely stupid title, but if I know what it is,
I'm sorry for yet another of these posts, but from what I can tell,
Sorry for this not being a real question, but Sometime back i remember seeing

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.