nsxmlparser

storing & reading xml files iPhone

I am using text-editor to store xml files. I know how to read xml files in iPhone application. But the problem which do i get is explained below. When I store xml files through text-editors, it looks perfect. But when iPhone - xCode debugs, xml file data is shown as below. What kind of mistake have I Done? {\rtf1\ansi\ansicpg1252\c...

How to decode shift-jis encoded data in an XML document using Cocoa (iPhone)

Hi, I have an XML document that may have shift-jis encoded data in it and I'm trying to parse it using an NSXMLParser object. Ordinarily I assume the document is UTF8 encoded and all is well - does anyone know if/how I can determine if an element is shift-jis encoded and then how to decode it? Thanks ...

faster xml reading required in iPhone

I have following code - methods to read xml files. But it works very slow for me. Isn't there any sufficient way to fetch & read data faster. if(connectionRemaining) { [self LoadingPopUp]; NSURL *tmpURl=[NSURL URLWithString:[NSString stringWithFormat:@"%@getcategory.php",[iGolfAppDelegate getServerPath]]]; NSMutableURLRequest *theReq...

NSXMLParser Error

Hi, I am fetching data from this url "http://potlocator.com/locationXML.php", But while parsing the data with NSXMLParser, i am getting this error, found Error Operation could not be completed. (NSXMLParserErrorDomain error 68.) What might be the problem ? Thanks ...

is it possible to reuse appdelegate in applicationDidFinishLaunching ?

Hi all, I am developing a tab bar application. I have five tabs in it. For each tab i have separate navigation controller. For each tab's table View I want to load data from a web service. I can do so for one tab by making a separate xmlparser class initializing it with appdelegate then call it in the applicationDidFinishLaunching ....

NSXMLParser Parser Error With G1 Only

Hey all I have a simple xml doc.. it is well formed and passes correctly when using: xmlData = [[NSXMLParser alloc] initWithContentsOfURL:xmlURL ]; Over WiFi or 3G. However I receive a NSXMLParserPrematureDocumentEndError when using G1. I'm thinking the slower connection somehow cuts off the xml document after some time but can't ...

How to resolve an internally-declared XML entity reference using NSXMLParser

I have an XML file that uses internally-declared entities. For example: <?xml version="1.0" encoding="UTF-8"?> ... <!ENTITY my_symbol "my symbol value"> ... <my_element> <my_next_element>foo&my_symbol;bar</my_next_element> </my_element> ... Using the NSXMLParser class, how am I able to resolve the my_symbol entity reference? ...

NSXMLParser avoids UILabel to show/hide

Hi, I have the following methods in my class: -(IBAction)loginToAccount:(id)sender { // Display the network activity status indicator [UIApplication sharedApplication].networkActivityIndicatorVisible = YES; // Show the load indicator [self.loadIndicator startAnimating]; self.loadIndicator.hidden = NO; self.loadLabel.hidden = NO;...

NSArray atomfeed and categories

Hi, I have an atomfeed with which is succesfully getting parsed. All the articles are in the root array. But now I also have categories as a tag in the feed. How can I parse the atom xml so that the root array contains the categories and each category filters to an array with the corresponding articles. Thanks, Bing ...

NSXMLParser Leaking

Hello, I have the following code that leaks. Instruments says that it is the rssParser object that is leaking. I "refresh" the XML feed and it runs the block and it leaks.... file.h @interface TestAppDelegate : NSObject <UIApplicationDelegate> { NSXMLParser *rssParser; } file.m NSData *data = [ NSURLConnection sendSynchrono...

What is the meaning of NSXMLParserErrorDomain error 5.?

Ok, I am back on this task. I have my XML properly download from my webserver with a URL pointing to the server's file, however, when I detect the network is 'unreachable' I simply point the URL to my application's local XML and I get the following error (N.B. the file is a direct copy of the one on the server). I cannot find detail desc...

How to parse xml file that is encoded with another encoder different from utf-8 with using NSXMLParser in objective-C?

Is there a way to parse xml file that is encoded with windows-1254 with using NSXMLParser? When i try, didStartElement method not called. ...

NSXMLParser foundCharacters method!?

Hey! i'm using the NSXMLParser to fetch a String from xml. I'v created a class to store the data with synchronized variables. To get the text between the elementName i use the foundCharacter function. And to store the Strings i use a MutableString *. When i find the String and print everything is correct but when i'm done the two differ...

NSOperation will not cancel NSXMLParser. Which continues to call methods on delegate causing crash

I am trying to download some XML on another thread, and parse it. I release the 'controller' then call cancelAllOperations on the NSOperationQueue. And implement method 'cancel' on NSoperation which attempts to set nSXMLParser's delegate to nil. But a second or so later the NSXMLParser is still alive and kicking and calls methods on i...

NSXMLParser iPhone memory strategy for large xml

Hi I build a parsing algorithm using NSXMLParser. Im having doubt as to what is the best strategy for keeping my memory usage on a minimum. I have a valueObject (e.g. "Person") this object has ≈ 30 NSString properties, while parsing the xml I continually alloc and release a temporary Person object as the nodes are traversed. I checked ...

iPhone - prevent Invalid Hex character error with NSXMLParser

Hi I am parsing an XML coming from a web server and the parsing sometimes stops with Error code 6. From the documentation, I found out the error is NSXMLParserInvalidHexCharacterRefError. The character in question is Ĵ. Can someone please tell me how I can prevent NSXMLParser from sending an error if it encounters these characters (or ...

Error Code 31 read RSS with NSXMLParser

hi, i'm getting this error as i read RSS beginning with xml version="1.0" encoding="US-ASCII"? if i change like that xml version="1.0" encoding="UTF-8" , no problem to read the same RSS. Do i have to ? 1/ download from a server to a file 2/ read the encoding and replace it by UTF8 3/ parse the file... or can i do something else BEFORE...

NSXMLParser chokes on ampersand &

I'm parsing some HTML with NSXMLParser and it hits a parser error anytime it encounters an ampersand. I could filter out ampersands before I parse it, but I'd rather parse everything that's there. It's giving me error 68, NSXMLParserNAMERequiredError: Name is required. My best guess is that it's a character set issue. I'm a little fuz...

NSXmlParser doesn't work in iphone sdk 3.0

Hi. i noticed strange problem in sdk 3.0. When i parse XML everything works fine in any sdk 2.x but sdk 3.0 doesn't it. I didn't find any difference in NSXMLParser but any 2.x sdk works fine and 3.0 doesn't. If anybody met such problem and tell me how to u solve it? -> rssParser is NSXmlParser object. In sdk 3.0 i call this method.[r...

NSXMLParser Error

Hi All, I am using NSXMLParser to parse the html file on the server side.(using iphone sdk 3.0) and my parser stop parsing after it encounter any error and call the delegate message (void)parser:(NSXMLParser *)parser parseErrorOccurred:(NSError *)parseError My Ques:How can I parse the file after it encounter the error.Is there any ...