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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T17:46:00+00:00 2026-05-23T17:46:00+00:00

Currently, I have a class that is parsing XML and sending the dictionary that

  • 0

Currently, I have a class that is parsing XML and sending the dictionary that the XML is parsed to to a view controller.

Here is a snippet of the code that sends the dictionary to the other class (where “response” is the dictionary):

if ([elementName isEqualToString:@"SessionData"]) 
{
// We reached the end of the XML document
// dumps dictionary into log
NSLog(@"Dump:%@", [response description]);

// sends dictionary to the VC
CardSetupViewController *setup = [[CardSetupViewController alloc]init];
setup.response = self.response;

//checks
NSLog(@"%@ lololololol", [setup.response description]); //THIS WORKS FINE!!
return;
}

At that point, the code works fine. That NSLog marked with //THIS WORKS FINE!! works… obviously. Here is the method in the ViewController:

- (BOOL)authorize //this 
{
    AddCard *addCard = [[AddCard alloc]init];
    ServerConnection *connection = [[ServerConnection alloc]init];
    //XMLParser *xmlParser = [[XMLParser alloc]initXMLParser];

    //serverReturn posts the data and is the ACTUAL server response in NSData form
    NSData *serverReturn = [connection postData:[addCard textBoxToXml:
                                                    [self nameOnCardGet]:
                                                    [self ccNumGet]:
                                                    [self expMoGet]:
                                                    [self expYrGet]:
                                                    [self cvvGet]:
                                                    [self zipGet]:
                                                    [self nickNameGet]:
                                                    [self pinGet]]];

    //This takes the information from the server and parses it to "response"
    //Creates and inits NSXMLParser Object
    NSXMLParser *nsXmlparser = [[NSXMLParser alloc] initWithData:serverReturn];
    //Create and init our delegate
    XMLParser *parser = [[XMLParser alloc] initXMLParser];
    //set delegate
    [nsXmlparser setDelegate:(id <NSXMLParserDelegate>) parser];



    //initiates self.response THIS MAY NOT BE NEEDED
    //response = [[NSMutableDictionary alloc]init];

    //parsing
    BOOL success = [nsXmlparser parse];
    //error catch testing
    if (success) {
        NSLog(@"No errors");
    } 
    else {
        NSLog(@"Error parsing document!");
    }
    //dump   
    NSLog(@"ZOMG CHECK DIS OUT%@", [response description]);
    return NO;
}

Basically, the NSLog that states “ZOMG CHECK DIS OUT” is returning (null) and I can’t figure out why. No compilation errors, it is a property/synthesize as well. Any ideas?

Thanks in advance. Oh, and please excuse my NSLog comments. I had to differentiate from different parts of the code, and I was in a good mood.

Edit: I am using Automatic Reference Counting. Don’t worry, nothing is leaking.

  • 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-23T17:46:01+00:00Added an answer on May 23, 2026 at 5:46 pm

    In your first code block, you generate a CardSetupViewController and then leak it. It is unrelated to whatever object is running the second code block. I assume that your second view controller is from your NIB?

    Note that you’re also leaking your NSXMLParser.

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

Sidebar

Related Questions

Currently I have a class that looks like this: public class MyClass : IMyClass
Currently I have a class that is extending the ListActivity class. I need to
We currently have a utilities class that handles a lot of string formatting, date
I currently have a helper class that I am using to obfuscate a static
I currently have a class called clientActivity that contains a finger paintig activity that
I have a class that currently has several methods that take integer parameters. These
Currently I have created a ABCFactory class that has a single method creating ABC
Good evening, In my app that I'm currently developing, I have a class that
I'm currently working on Mangler's Android implementation. I have a java class that looks
I currently have service classes that look something like this public class UserService :

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.