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

The Archive Base Latest Questions

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

At the last part of the tutorial I am having an issue with the

  • 0

At the last part of the tutorial I am having an issue with the users variable, its saying users variable is undeclared.

It is being declared in my NSXMLPaser class that I created as a NSMutableArray and I am “#import”ing the header file of NSXMLPaser class…

Here is the link to the tutorial I am working through, any help would be greatly appreciated.

http://wiki.cs.unh.edu/wiki/index.php/Parsing_XML_data_with_NSXMLParser

- (void) doParse:(NSData *)data {


    NSString * filePath = [[NSBundle mainBundle] pathForResource:@"data" ofType:@"xml"];
    NSData * fileData = [NSData dataWithContentsOfFile:filePath];

    // create and init NSXMLParser object
    NSXMLParser *nsXmlParser = [[NSXMLParser alloc] initWithData:fileData];

    // create and init our delegate
    XMLParser *parser = [[XMLParser alloc] initXMLParser];

    // set delegate
    [nsXmlParser setDelegate:parser];

    // parsing...
    BOOL success = [nsXmlParser parse];

    // test the result
    if (success) {
        NSLog(@"No errors - user count : %i", [parser [users count]]);  // users undeclared error here
        // get array of users here
        //  NSMutableArray *users = [parser users];
    } else {
        NSLog(@"Error parsing document!");
    }

    [parser release];
    [nsXmlParser release];

}
  • 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-22T17:30:18+00:00Added an answer on May 22, 2026 at 5:30 pm

    Either you use “[parser.users count]” like Babji said or you could use the dot notation for everything, like “parser.users.count”.

    Also, you could use “[[parser users] count]”. This means you first get the collection users of the parser (“[parser users]”) and then you call count on that collection (“[[parser users] count]”).

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

Sidebar

Related Questions

I have seen this question that talks about getting the last part of a
I need to get the last part of current directory, for example from /Users/smcho/filegen_from_directory/AIRPassthrough
I'm having problems with the last part of my project on this algorithm. I'm
Hopefully the last part of this menu I've been working on. It've got the
This is the last part of the program I am working on. I want
I really need help with this last part of my program. I need to
I am struggling with the last part of my project in regards to HtmlUnit.
I am tying to retrive the last part of an path . I have
Hi everyone Im on to the last part now which is file reading. i
I'm implementing a simple update mechanism for an application I'm writing the last part

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.