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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T00:58:45+00:00 2026-06-02T00:58:45+00:00

I have some problems with my XML parser, written in obj-c. The parser itself

  • 0

I have some problems with my XML parser, written in obj-c.
The parser itself is fine but I cant access the result Array in the DetailView.

I need the values of the array created by the Parser Class in my Master and DetailViewController.

In MasterViewController I do this:

MasterViewController.h

#import <UIKit/UIKit.h>
#import "AppDelegate.h"
#import "TouchXML.h"
#import "Parser.h"

@class Parser;

@interface MasterViewController : UITableViewController{
    Parser *theParser;
    }

MasterViewController.m

- (void)viewDidLoad
{
    theParser = [[Parser alloc] init];
    [theParser startParser:xmlPath]; //Now the parser runs and parses all needed values into arrays
}

Then I push on click the DetailView and I want to access the values there too.

UniViewController.h

#import <UIKit/UIKit.h>
#import "AppDelegate.h"
#import "Parser.h"

@interface UniViewController : UITableViewController{

    Parser *theParser;
}

UniViewController.m

- (void)viewDidLoad
{
   NSLog(@"Name: %@",[[theParser.listArray objectAtIndex: 0]valueForKey:@"name"]);
}

Here I want to access the the Array from the parser but I always get the value (null) ?
In the debugger I saw that theParser has 0x0000 which cant be right…
After I do theParser = [[Parser alloc] init]; here, it has an hex value but I still get the (null).

How can I access the Array values from the DetailView?

Would be really nice if someone could explain me the problem here.

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-06-02T00:58:46+00:00Added an answer on June 2, 2026 at 12:58 am

    Your detail view has to have a pointer to the array that your MasterView creates (via the parser), try this:

    (void)viewDidLoad
    {
        aParser = [[Parser alloc] init];
        [aParser startParser:xmlPath];
        myUniView.theParser = aParser; //myUniView is just the detail view you're pushing
    

    and then after this you can push your detail view.

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

Sidebar

Related Questions

I have some problems on a site with the concurrent access to a list.
I'm trying to write an xml parser but seem to be running into some
I'm having some problems reading data from XML and load it into an array.
I'm running some XML through a SAX parser and have noticed the parser is
I have some problem when unmarshaling a .xml at a web service using JAXB.
I have some problem with my code public IQueryable<PageItems> GetPageById(Guid Id) { var xml
Has anyone had this problem? My projects tend to have some long XML files
I have one problem , I want to get some data from XML file
I have some problems with Miktex installed on Windows Vista Business SP1/32 bit. I
I have some problems sending mails through SMTP using Spring's MailSender interface and the

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.