Subscribe ( )

iPhone Programming Tutorials


 

Forum

You must be logged in to post Login Register

Search 

How to read an XML file from a website

User Post

10:21 pm
October 9, 2008


iCoder

posts 6

1

I am trying to figure our how to read an XML file from a website. I have used the NSXMLParser but I have memory leaks that I cannot figure out.

I anyone has sample code it would be greatly appreciated.

I commented out all my code except for the below and Instruments says that the line NSXMLParser *rssParser has a memory leak:



                            


                            
- (void)parseXMLFileAtURL:(NSString *)URL
{
    NSMutableArray * messageCountArray = [[NSMutableArray alloc] init];
    NSURL *xmlURL = [NSURL URLWithString:URL];
    NSXMLParser *rssParser = [[NSXMLParser alloc] initWithContentsOfURL:xmlURL]; // causes leak, I believe

    [messageCountArray release];
    [rssParser release];
}

Thank you


Search 

About the iCodeBlog forum

Most Users Ever Online:

44


Currently Online:

2 Guests

Forum Stats:

Groups: 2

Forums: 6

Topics: 419

Posts: 893

Membership:

There are 934 Members

There has been 1 Guest

There are 2 Admins

There is 1 Moderator

Top Posters:

bobcubsfan – 54

crazyiez – 30

Uhu – 17

AdeC – 17

Nick – 15

jitesh61 – 12

Administrators: Brandon (88 Posts), Collin (0 Posts)

Moderators: VertigoSol (26 Posts)



©   

  • Posted by on 6 Aug 2008 in Uncategorized
  •   |  
  •   |  
  •   |  
  • Comments Off

Comments are closed.