nsxmlparser

[SOLVED] Iphone NSXMLParser NSCFString memory leak

I am building an app that parses an rss feed. In the app there are two different types of feeds with different names for the elements in the feed, so I have created an NSXMLParser NSObject that takes the name of the elements of each feed before parsing. Here is my code: NewsFeedParser.h #import @interface NewsFeedParser : NSObjec...

How do I loop nodes using NSXML on the Mac and change each node's text value.

Hello - have been stuck on this for days now- How can I loop every node in an XML document and change the text value of the node. For example go from this: <root> <node1>some text</node1> <node2> <node3>some more text</node3> </node2> </root> to something like: <root> <node1>updated text</node1> <node2> <...

XML parsing to plist iPhone SDK

Hi, guys. Could you, please, help me with parsing of this XML code: <?xml version="1.0" encoding="utf-8"?> <stuff> <parts> <part id='327'> <name>Logitech MX500</name> <serial>618163558491989</serial> <account>ASDALSKD</account> <number>987 789 456</number> <alarm>alarm...

Managing NSXMLParser loaded data across the application.

I have an xml file that I need to load. This xml file holds data that needs to be accessed by a few classes. I'm wondering what the best approach would be to deal with this. Basically I need a way to keep the data centralized and allow various classes to access it. Either that or have each class re-parse the xml file for the data it ...

Problem with parsing XML with iPhone app

Hi, I have a problem with a xml parsing. I have create a class for parsing. The xmlURL is correct (testing it from debug) but when i call the method parse the variable success become FALSE and a errorParsing is "NSXMLParserErrorDomain". Can you help me? My code is below. #import "xmlParser.h" #import"Posizione.h" @implementation xmlP...

NSXMLParser on the iPhone, how do i use it given a xml file (newb here :\)

Hey guys, was wondering how do i use the NSXML parser. so lets say given i have a simple xml file with elements like 1/1/1000 14:15:16 How could i use the NSXMLParser to parse the XML File(Its on locally btw, desktop), check through each element and store each of them in an array either to be displayed/used later? I was looking throu...

NSXMLParser and Geonames

I'm trying to parse a call from Geonames with NSXMLParser in the iPhone SDK. I've used this before but for some reason I'm getting an empty dictionary back even though I get results back in a web browser. Can someone please point out what I may be doing wrong. Below is the code I'm using and the results that comes back pasting it in a b...

error while soap request call

Hello. I am trying to make a soap call. Its a very basic call wit Welcome User output. The return value is in xml format. and i am getting the following error. can anyone plz tell me what this error means. The following code shows the soap request and post request that i have made NSString *soapMessage = [NSString stringWithFormat: @"<...

How to parse XML with special characters?

Whenever I try to parse XML with special characters such as ō or 満月先生 I get an error. The xml documents claims to use UTF-8 encoding but that does not seem to be the case. Here is what the troublesome text looks like when I view the XML in Firefox: Bleach: The Diamond Dust Rebellion - M� Hitotsu no Hy�rinmaru; Bleach - The Diam...

OO model for nsxmlparser when delegate is not self

Hi, I am struggling with the correct design for the delegates of nsxmlparser. In order to build my table of Foos, I need to make two types of webservice calls; one for the whole table and one for each row. It's essentially a master-query then detail-query, except the master-query-result-xml doesn't return enough information so i then n...

Parsing XML in Hebrew language

I'm using NSXMLParser in iphone app that I'm working on. Later I'm displaying the text in a view. All is well when I'm using english language in my XML. But my XML is in Herbrew language. I'm not able to read the text properly and display it.Please advice me what change do I've to make in XML. ...

Parse xml file with same tag multiple times iphone sdk

Hi all, In my application, I have a tag multiple times. I'm using xml parser. I'm taking a corresponding element with similar name as the one in xml file in my class. So in case of: <photo>abc</photo> <photo>def</photo> What I get in photo element of my class is the second element i.e def, as the first one gets overwritten as ther...

Iphone: Parsing XML with image in tablecells

I am going to develop an Iphone application which will parse the RSS feeds and display the items in my custom cell.(Cell containing the image, label, description, etc). Can somebody please help me?I would be sooo happy if somebody can help me!! Thanks so much! ...

"stringWithContentsOfURL" returns empty data

Hi, i am working with web services these days ,and with all xml files that i am parsing things are fine ,but with the last one the famous method "stringWithContentsOfURL" returns empty data. Why? ...

Passing NULL value

Hi. I use an instance of NSXMLParser. I store found chars in NSMutableStrings that are stored in an NSMutableDictionary and these Dicts are then added to an NSMutableArray. When I test this everything seems normal: I count 1 array, x dictionnaries and x strings. In a detailview controller file I want to show my parsed results. I call t...

IPhone- Rss sample code, modify to display images... PLease help!!!

Hi! I am trying to make app that displays an RSS feed, with text and images into a table, but I am really struggeling with it! I found a really good [sample code-project][1] that i can really recommend-- but im struggeling getting it to display images in the tablecells instead of only text I would be reeeeally happy with any help!! ...

Have NSXMLParser parse the contents of multiple URLs at once

I've been using NSXMLParser on the iPhone to parse out XML files from the web without any problems. I'm now in a situation though where I want to get the contents of three different URLs and then parse them all at once. I'm doing this by creating three NSMutableData instances, each filled with the contents of one of the three URLs. I'm ...

Has NSXMLParser become more strict in iPhone SDK 3.x?

I recently migrated an iPhone project from the 2.2.1 SDK to 3.1.x and, to my surprise, an XML feed that was (and still is with the published app) being parsed by the 2.2.1 NSXMLParser is now causing NSXMLParser to return errors. The XML document in question doesn't meet the W3C standard, but the 2.2.1 parser is able to handle this. I'm...

Speed of NSScanner vs NSXMLParser?

I have an iPhone App that reads in an XML file, then pulls out the necessary data by looping through an NSScanner. The XML is not particularly long. I am wondering if it would be worth the work to implement NSXMLParser in place of using NSScanner, if I will see any real improvement in speed? ...

Quick way to get an NSDictionary from an XML NSData representation?

I've loaded an XML file as NSData into memory and parse over the elements using NSXMLParser. Although it works, it's a very ugly and hard to maintain code since there are about 150 different elements to parse. I know there are nice third-party solutions, but I want to keep it with the iPhone SDK for purpose of practice and fun. So I th...