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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T14:53:42+00:00 2026-06-18T14:53:42+00:00

Here is the method in my item class which beckons my parser. This method

  • 0

Here is the method in my item class which beckons my parser. This method is beckoned by my viewController.

- (NSString*)img
{
if (img!=nil) return img;
   if (_description!=nil)
   { 
 //    NSString* description = [NSString stringWithString:_description];
htmlParser = [[HtmlParser alloc] InitHtmlByString:_description]; 
   }
return img;
}

Here is my parser’s init method…

- (HtmlParser *) InitHtmlByString:(NSString *)htmlString {

NSString *description = currentHTMLElement.description;
NSLog(@"%@", description);
NSData *nsData = [[NSData alloc] initWithContentsOfFile:(NSString *)description];
elementArray = [[NSMutableArray alloc] init];

parser = [[NSXMLParser alloc] initWithData:nsData];
parser.delegate = self;
[parser parse];

currentHTMLElement = [ArticleItem alloc];
                  return self;
}

Right now I am getting an output like this:

013-02-11 15:26:18.564 DrillDownRSS[9251:c07] (null)

2013-02-11 15:26:18.612 DrillDownRSS[9251:c07] (null)

2013-02-11 15:26:18.662 DrillDownRSS[9251:c07] (null)

2013-02-11 15:26:18.695 DrillDownRSS[9251:c07] (null)


Here is the solution, thanks to the below comment’s thoughtful advice.

//    NSString *description = [NSString string];
NSData *nsData = [[NSData alloc] initWithContentsOfFile:(NSString *)string];
elementArray = [[NSMutableArray alloc] init];

parser = [[NSXMLParser alloc] initWithData:nsData];
parser.delegate = self;
[parser parse];
NSLog(@"%@", string);

currentHTMLElement = [ArticleItem alloc];
                  return self;
  • 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-18T14:53:43+00:00Added an answer on June 18, 2026 at 2:53 pm

    Try to avoid any self declared variable / Property named description.
    I had a strange bug, because this overrided the default description (which each object has.)

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

Sidebar

Related Questions

(edit) more info. First notice new virtual. This class inherits a base class which
I have this class public class Item { public Coordinate coordinate { get; set;
I have created an AsyncTask which read JSONArray in the doInBackground Method and return
Here's a curious one. I have a class A. It has an item of
here's activity 1 which is a listview. when the user clicks on an item,
I have a class MyCol, which inherits from ObservableCollection(Of T). It overrides InsertItem method
I have carried the method here on almost all of the areas where I
First, I'm speaking about the default hashCode() method here and not something overridden. When
Here's the method. I want to know if I am violating any best practices
here's the method: public static int chooseStrat () { String[] strats = new String[1]

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.