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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:42:18+00:00 2026-05-28T01:42:18+00:00

I tried to parse following String using TBXML. <panel><start><post_id>4</post_id><user_id>2</user_id><post>Hyder here</post><created_on>2012-01-09 06:36:59</created_on><likes>0</likes><noc>0</noc><status>A</status></start><start><post_id>3</post_id><user_id>2</user_id><post>Hello hyder here</post><created_on>2012-01-09 06:34:09</created_on><likes>0</likes><noc>0</noc><status>A</status></start><start><post_id>2</post_id><user_id>0</user_id><post>Hi,

  • 0

I tried to parse following String using TBXML.

<panel><start><post_id>4</post_id><user_id>2</user_id><post>Hyder here</post><created_on>2012-01-09 06:36:59</created_on><likes>0</likes><noc>0</noc><status>A</status></start><start><post_id>3</post_id><user_id>2</user_id><post>Hello hyder here</post><created_on>2012-01-09 06:34:09</created_on><likes>0</likes><noc>0</noc><status>A</status></start><start><post_id>2</post_id><user_id>0</user_id><post>Hi, This is Syed Hyder....</post><created_on>2012-01-09 01:07:36</created_on><likes>0</likes><noc>0</noc><status>A</status></start><start><post_id>1</post_id><user_id>0</user_id><post>Hello, gaurav....How are you.</post><created_on>2012-01-09 01:05:11</created_on><likes>0</likes><noc>0</noc><status>A</status></start></panel>

My code: –

NSMutableArray *newArr = [[NSMutableArray alloc] init];//21
    RXMLElement *rxml = [[RXMLElement alloc] initFromXMLString:response];
    [rxml iterate:@"panel.start" with:^(RXMLElement *start) {
        ModelPost *newPost = [[ModelPost alloc] init];
        newPost.message = [NSString stringWithFormat:@"%@", [start child:@"post"]];
        NSLog(@"Post = %@", [start child:@"post"]);
        [newArr addObject:newPost];
    }];

but I am unable to do it or enter in the iterate loop.
Please help me to over come this by sample code, suggestions and tutorials.
Thanks in Advance….

  • 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-28T01:42:19+00:00Added an answer on May 28, 2026 at 1:42 am
     - (void)xmlparserurl{
    
    //xml data url calling....
    
        tbxml = [[TBXML tbxmlWithURL:[NSURL URLWithString:@"http://karen.webmascot.com/iapi/orders.php?max_count=10"]] retain];
    
    
    records = [NSMutableArray array];
    [records retain];
    
    
    
    
    //retrieving all data from the xml
    if (tbxml.rootXMLElement){
        NSLog(@"inserting");
        [self traverseElement:tbxml.rootXMLElement];
    }
    [tbxml release];
    }
    
    - (void)traverseElement:(TBXMLElement *)element {
    do {
        //NSLog(@"%@",[TBXML elementName:element]);
        if (element->firstChild) 
            [self traverseElement:element->firstChild];
        if ([[TBXML elementName:element] isEqualToString:@"start"]) {
            //NSLog(@"xml element checking");
            TBXMLElement *id = [TBXML childElementNamed:@"attribute name" parentElement:element];
    
    //inserting into the mutable array      
    [records addObject:[NSArray arrayWithObjects:
    [TBXML textForElement:elementname],
    [TBXML textForElement:elementname],
    [TBXML textForElement:elementname],nil]];
    
        }
    
    } while ((element = element->nextSibling)); 
    
    
    [self.tableview reloadData];
    }
    

    i am only sending the code of retrieving the xml data. i am also sending the tutorial where you will get the answer of your further question.

    http://www.tbxml.co.uk/TBXML/API.html

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

Sidebar

Related Questions

I want to parse the following using StringTokenizer for every string matching agent> .
Tried following the instructions here: How to use Google app engine with my own
I am new to jquery. I am trying to parse xml string using jquery.
I tried to use the following example codes by using a ? b :
I'm using the parsec Haskell library. I want to parse strings of the following
i have written the following code but it is giving parse error . here
Hi Guys I would like to parse the following xml string in C# i
My understanding of the Integer.TryParse() function was that it tried to parse an integer
I have a string like the following: <118>date=2010-05-09,time=16:41:27,device_id=FE-2KA3F09000049,log_id=0400147717,log_part=00,type=statistics,subtype=n/a,pri=information,session_id=o49CedRc021772,from=prvs=4745cd07e1=example@example.org,mailer=mta,client_name=example.org,[194.177.17.24],resolved=OK,to=example@example.org,direction=in,message_length=6832079,virus=,disposition=Accept,classifier=Not,Spam,subject==?windows-1255?B?Rlc6IEZ3OiDg5fDp5fog+fno5fog7Pf46eHp7S3u4+Tp7SE=?= I tried using CSV module and
I'm using the following code to load a list of objects from XML using

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.