nsxmlparser

iPhone NSXMLParser parsing string and storing in a NSNumber variable and different data types

Hi, I am trying to parse a XML File using NSXMLParser, I also have a Container class, in which I have a few instance variables. One of the elements that I am trying to parse in the XML is: <book sn="32.859669048339128" pn="-116.917800670489670"> I am trying to save the value of sn and pn in an instance variable of object Container: ...

NSXMLparser errorcode 5

Hi, I'm using Amazon's simpledb in my app. When parsing xml it gives an error with the code 5. ie. NSXMLParserErrorDomain error 5. Sometimes it works fine and without any significant change in the navigation is gives that error. Again it works fine when i restart the app several times without doing any changes to the code or navigation...

iphone's nsxmlparser parsing RSS causes encoding problems

Hi, Im working on simle RSS reader. This reader loads data from internet via this code: NSXMLParser *rss = [[NSXMLParser alloc] initWithURL:[NSURL URLWithString:@"http://twitter.com/statuses/user_timeline/50405236.rss"]]; My problem is with encoding. RSS 2.0 file is supposed to be UTF8 encoded according to encoding attribute in XML fi...

Parsing XHTML with inline tags

Hi, I'm trying to parse an XHTML document using TBXML on the iPhone (although I would be happy to use either libxml2 or NSXMLParser if it would be easier). I need to extract the content of the body as a series of paragraphs and maintain the inline tags, for example: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/T...

NSXMLParser & memory leaks

Hi, I am parsing an XML file using a custom class that instanciates & uses NSXMLParser. On the first call everything is fine but on the second, third and later calls Instruments show tens of memory leaks on certain lines inside didEndElement, didEndElement and foundCharacters functions. I googled it and found some people having this i...

iPhone XMLParser help

I am needing to parse an XML file for my app and I dont have any clue how to do it. I went through one XMLParser tutorial, and it worked fine but the XML file in the tutorial was very simple and my XML file is quite a bit more complex. here is a snippet of the xml file: <?xml version="1.0" encoding="UTF-8"?> <digital_tpp cycle="...

parse XML file that contains unicode characters in iphone

Hi, I am trying to parse one XML file that contains some unicode characters.I tried to parse the file using NSXMLParser but i am unable to parse XML.Parser stops when it encounters any unicode characters. Is there any other good solution to parse XML file with unicode letters? Please suggest. Thanks, Jim. ...

How can I release this NSXMLParser without crashing my app?

Below is the @interface for an MREntitiesConverter object I use to strip all html tags from a string using an NSXMLParser. @interface MREntitiesConverter : NSObject { NSMutableString* resultString; NSString* xmlStr; NSData *data; NSXMLParser* xmlParser; } @property (nonatomic, retain) NSMutableString* resultString; - (NS...

Easiest Way to Parse data from twitter with Cocoa

Hello, I've followed the tutorial from here: Twitter Client Tutorial to make a little twitter app. Now I need to find out how to parse the XML twitter gives you when you make a request. I've looked at tons of tutorials on phrasing xml on the iPhone but none have made much sense because Im still new to cocoa. Twitter stores the text of t...

NSXMLParser with multiple attributes

Hi. I have the following XML (doing an app for iPhone): <Row> <Field name="employee_id_disp">00070431</Field> <Field name="given_name">John</Field> <Field name="family_name">Doe</Field> </Row> ... How can I retrieve values only for one of the attributes, for example value "John" for attribute name="given_name" ? Thanks for answers. ...

iPhone: Parsing multiple XML with NSXMLParser in background disturbing each other

I have a strange issue, when it comes to parsing XML with NSXMLParser on the iPhone. When starting the app, I want to preload 4 table-views, that are populated by RSS-Feeds in the background. When I init the table-views one-by-one, than loading, parsing and displaying all works like a charm. But when I try to init all view at once (at t...

Simple method to read XML from a URL - iPhone

I started doing when I reached to pull the XML data, both simple ways and XML data category overview example Someone who can help me here? possible. with links to some simple ways to do it. ...

Ignoring namespace prefix while parsing xml

If a xhtml file has namespace prefixes in the document and the namespace for the prefixes is not defined, is it possible to ignore the prefixes and still parse the file when using SAX parser. Is there a way to get rid of the error "The prefix for element is not bound." without defining the namespace for the prefixes while parsing? ...

Special characters in XHTML - Parse Error

When there are special characters like & in the xhtml the DOM / SAX parser throws parse exception. The xhtml document is got as an input for my component. I want to ignore such special characters when i parse. How can i achieve it using DOM/SAX JAVA parser. ...

Can't manage to find any answers to the last bug my app has ... [challenge inside ;)]

Hi everyone, I finally get no leaks in my app but I still manage to get my app to crash from time to time ... it is really rare but it pisses me off ;) Here is what I get : 2010-05-11 19:36:29.487 Infonul[2457:20b] *** -[NSCFString _setParserError:]: unrecognized selector sent to instance 0x3cddb80 [Session started at 2010-05-11 19:...

NSXMLParser not parsing attributes. No NSXMLParser Error.

I am trying to parse the XML located at this URL: http://www.iglooseat.com/gis_iphone_xml.php?zip=06488 1) This method gets invoked when the user presses a button on the Iphone to retrieve the xml data (IBAction)getLocations:(id)sender { ... NSString *urlString= [[NSString alloc] initWithFormat:@"http://www.iglooseat.com/gis...

How to abort iPhone's NSXMLParser wait

When init the NSXLParser as below: NSXMLParser* xmlParser=[[NSXMLParser alloc] initWithContentsOfURL:[NSURL URLWithString:urlstring]]; if the server is down, it will wait for quite some time before the thread returns. It is really annoying even if I exit the application and restart the application, it will continue to wait with a blac...

How to notify ViewController on parse end with multiple ViewControllers using a single parser.

Hello, I have created a RSS parser and 3 TableViews and it parses the RSS files fine but I don't know how to notify the TableViewController when parsing has ended so it can update the view. The TableViewController initiates the parser and the parsing of a feed. parser = [[RSSParser alloc] initWithURL:@"http://randomfeed.com"]; I can ...

Network errors when initializing NSXMLParser on iPhone

How can I detect and properly report a connection error when executing this line of code: NSXMLParser *parser = [[NSXMLParser alloc] initWithContentsOfURL:feedUrl]; Is there a clean way to do it or will I have to break this up code up into NSURLRequest, NSURLConnection, etc... ...

UIAlertView within XML Parser didEndElement not showing

Hi guys, I am working on an iphone application. Application uses .net web service to perform an operation and return the status either "Success" or "Failure". I am getting this status in xml parser didEndElement like if( [elementName isEqualToString:@"OperationStatusResult"]) { } I am trying to show an UIAlert view if status is fai...