Tag: nsxmlparser

How to use NSXMLParser to parse parent-child elements that have the same name

Does anyone have some idea how to parse the following xml using event-driven model NSXMLParser class? <Node> <name> Main </name> <Node> <name> Child 1 </name> </Node> <Node> <name> Child 2 </name> </Node> </Node> I want to collect all three names from this xml file, is it possible, or I have to change to Tree-based parsing?

NSXMLParser example

I have an XML like this <IS> <Value> <Signature>-804</Signature> <Amount>139</Amount> </Value> <Value> <Signature>-845</Signature> <Amount>639466</Amount> </Value> <Value> <Signature>-811</Signature> <Amount>16438344</Amount> </Value> <Value> <Signature>-1115</Signature> <Amount>-159733</Amount> </Value> </IS> Now I want to parse only specific values from this. For example, how do I get the value for the node having corresponding signature as -804 Please help me.. I know […]

how to get data which contains $ ` € and some Round Bullets using web service in Xcode

I am making a Business IOS application for iPhone. I am calling web service, it’s sends data in JSON Format.the response contains character Like $ and ‘ and € and some Round Bullets. when I am calling the web service while parsing data come their but before these characters data is present but after these […]

Web Url contains Spanish Characters which my NSXMLParser is not parsing

I am Parsing Web urls from server and storing them in Strings and then displaying it on Webview. But now when i am parsing Spanish words like http://litofinter.es.milfoil.arvixe.com/litofinter/PDF/Presentación_LITOFINTER_(ES).pdf it is accepting it PDF File Name ++++++ http://litofinter.es.milfoil.arvixe.com/litofinter/PDF/Presentaci PDF File Name ++++++ ón_LITOFINTER_(ES).pdf i.e two different strings… i know i have to make small change that […]

NSXMLParser doesn't ignore CDATA

im pretty new in ios development and im tryin to parse an RSS file(xml). here is the xml: (sorry for the language) <item> <category> General < / category > <title> killed in a tractor accident , was critically injured windsurfer </ title> <description> < ! [ CDATA [ <div> <a href=’http://www.ynet.co.il/articles/0,7340,L-4360016,00.html’> <img src = ‘http://www.ynet.co. […]

Memory Leak Using NSXMLParser in NSConcreteMapTable

I’m using NSXMLParser and I get a memory leak that points to NSConcreteMapTable, whatever that is: The leak occurs at this line of code when calling the parser from my AppDelegate.m: I have searched for a solution and can’t see what I’m doing wrong. Here is my code. Any help is greatly appreciated. lq // […]

XML Parsing issue in Xcode?

I am making a mac application, and I need it to parse a local xml file and display it into a tableView. For some reason, I get a blank row in my tableView, which makes no sense, as it has found characters that are in my xml. Here is my code: – (void)parserDidStartDocument:(NSXMLParser *)parser{ NSLog(@”found […]

Xcode Get image url from rss feed

Newbie to Xcode and would be thrilled to get an answer to this question. I am trying to get the image url tag from a rss feed and add it to my custom table view cell. The other text I get fine. This is the rss row: <Item> <title>this is a title</title> <description>this is a […]

NSXMLParser can't parse special characters (accents)

I’m using NSXMLParser to parse an xml from a url (my code is almost exactly the same as here) Some of the elements contain special characters like “á” which causes a word lik ándre to split into two (á and ndre). Here is my loadXMLByURL -(id) loadXMLByURL:(NSString *)urlString{ tickets = [[NSMutableArray alloc] init]; NSURL *url […]

Parsing Hierarchical XML in Swift using NSXMLParser

I’m really having problems getting hierarchical XML values back in a form that I can actually use, so any assistance would be much appreciated. I’m pretty new to Swift and IOS development, so to be honest I do not fully understand the parser, but I am hopeful after this that I will! Here’s an example […]