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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T17:31:04+00:00 2026-05-17T17:31:04+00:00

so I want to parse an xml and display (in a UITableView) the subjects

  • 0

so I want to parse an xml and display (in a UITableView) the “subjects” in ascending order depending on “lessons”

XML:

<parfumeo_kkn>
<tt_timetable>
    <id>1015</id>
    <day>1</day>
    <class_id>98</class_id>
    <lesson>9</lesson>
    <teacher>bt</teacher>
    <room>V1.2</room>
    <subject>M</subject>
    <pr_id>54</pr_id>
</tt_timetable>
<tt_timetable>
    <id>1014</id>
    <day>1</day>
    <class_id>98</class_id>
    <lesson>8</lesson>
    <teacher>bt</teacher>
    <room>V1.2</room>
    <subject>bg</subject>
    <pr_id>54</pr_id>
</tt_timetable>

ect.

(In this little example there would be “bg” before “M”.) I allready set up my parser but it’s not working in the order I want it to.
thx for help

  • 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-17T17:31:05+00:00Added an answer on May 17, 2026 at 5:31 pm

    You should separate the logic of the parser and how you display the results in the table views. The parser just does its task of parsing the xml, the controller for the table view will do a little bit extra task by ordering the results from the parser by using NSSortDescriptor, an example follows:

        NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"lesson" ascending:YES];
        NSArray *sortDescriptors = [[NSArray alloc] initWithObjects:sortDescriptor, nil];
    
        [fetchRequest setSortDescriptors:sortDescriptors];
    

    Yes, previously I am assuming you’re using Core Data, in case you just have a normal array, then you can just simply call:

        NSArray *myArray = [xmlResultArray sortedArrayUsingDescriptors:sortDescriptors];
    

    Now you can use myArray to populate to your table view controller.

    Hope this helps!

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

Sidebar

Related Questions

In my C++ program I want to parse a small piece of XML, insert
I want to parse some HTML in order to find the values of some
I wanted to parse the xml feed and display as links in my Blackberry
I am new to iphone development.I want to parse an xml page .The source
I am new to iphone development.I want parse an you-tube XML page and retrieve
I have some XML in an XmlDocument, and I want to display it on
hi i have xml file whitch i want to parse, it looks something like
I am having one xml file and I want to parse it to get
I want to parse some kind (or pure) XML code from a QString. My
How can I parse XML data using PHP? I want to get the contents

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.