Questions tagged [nsxmlparser]

NSXMLParser is a class of the Foundation Framework of Mac OSX developer library. This class allows developers to parse XML documents (including DTD declarations) in an event-driven manner.

NSXMLParser is a class of the Foundation Framework of Mac OSX developer library. This class allows developers to parse XML documents (including DTD declarations) in an event-driven manner. An NSXMLParser notifies its delegate about the items (elements, attributes, CDATA blocks, comments, and so on) that it encounters as it processes an XML document. It does not itself do anything with those parsed items except report them. It also reports parsing errors.

API documentation available at http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSXMLParser_Class/Reference/Reference.html

1267 questions
9
votes
4 answers

NSXMLParser Leaking

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 { …
Lee Armstrong
  • 11,420
  • 15
  • 74
  • 122
8
votes
2 answers

What's the best approach for parsing XML/'screen scraping' in iOS? UIWebview or NSXMLParser?

I am creating an iOS app that needs to get some data from a web page. My first though was to use NSXMLParser initWithContentsOfURL: and parse the HTML with the NSXMLParser delegate. However this approach seems like it could quickly become painful…
Benedict Cohen
  • 11,912
  • 7
  • 55
  • 67
8
votes
3 answers

parser.parse() in Swift leads to EXC_BAD_ACCESS

I'm following this tutorial as a jump start for an RSS feeder app I'm working on in Swift. I know there are some things that have changed in Swift since this tutorial, but none of them seem to explain why I'm having this issue. Relevant Code (as far…
ShivKatall
  • 83
  • 5
8
votes
3 answers

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? Main Child 1 Child 2 I want to…
Hoang Pham
  • 6,899
  • 11
  • 57
  • 70
8
votes
1 answer

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

I have an XML file that uses internally-declared entities. For example: ... ...
Ben Lever
  • 2,023
  • 7
  • 26
  • 34
7
votes
3 answers

Why is NSXMLParser picking up this whitespace in the foundCharacters method?

I'm learning to use the NSXMLParser API for the iOS platform and so far it's very easy to use. I'm having a small problem, however, in the foundCharacters method. As I understand it, it shouldn't pick up any whitespace since the…
BeachRunnerFred
  • 18,070
  • 35
  • 139
  • 238
7
votes
1 answer

Help solving NSXMLParser error 39 : NSXMLParserAttributeNotStartedError

I've been searching for about two hours now trying to find out what this error is and how to solve it. Apple's documents gladly says NSXMLParserAttributeNotStartedError Attribute is not started. Available in Mac OS X v10.3 and later. Declared…
Altealice
  • 3,572
  • 3
  • 21
  • 41
7
votes
3 answers

How can i Parse this xml using NSXMLParser in ios?

Radio1http://app.syndicationradio.fr/demo/logo1.pnghttp://cloud2.syndicationradio.fr:8020
Emon
  • 452
  • 3
  • 11
  • 21
7
votes
1 answer

Parsing an XML file stored in the Documents directory of an iPhone application

NSXMLParser has three types of init. -> init -> initWith Data -> initWithContents of URL => But my xml file is stored at Application's Document directory, so how to parse a file which is stored at "Doc Dir" Thanks in advance.
sagarkothari
  • 24,520
  • 50
  • 165
  • 235
7
votes
1 answer

What is this "PCDATA invalid Char value 11" error?

I have to use a XML file but I don't get all the items because of this error which is displayed in my navigator, before the content of the file. The exact error is : This page contains the following errors: error on line 4099 at column 10: PCDATA…
Rob
  • 15,732
  • 22
  • 69
  • 107
6
votes
3 answers

Parser error Error Domain=NSXMLParserErrorDomain Code=4 "The operation couldn’t be completed."

I am calling a web service as below: -(void)verifyEmailAndPasswordWebservices { NSString *MD5Password = [ self MD5]; NSLog(@"text field password %@",txt_Password.text); NSLog(@"converted password %@",MD5Password); NSString *soapMsg…
Rushi
  • 4,553
  • 4
  • 33
  • 46
6
votes
2 answers

Unable to set NSXMLParser delegate to self

I'm trying to create an NSXMLParser and call its delegate methods. On setting the delegate to self (2nd line below) I get a warning Sending 'XMLParserViewController *' to a parameter of incompatible type 'id '. What am I missing…
NSExplorer
  • 11,849
  • 12
  • 49
  • 62
6
votes
5 answers

Using Singleton synchronized array with NSThread

I have a books app with a UISearchBar, where the user types any book name and gets search results (from ext API call) below as he types. I am using a singleton variable in my app called retrievedArray which stores all the books. @interface Shared :…
copenndthagen
  • 49,230
  • 102
  • 290
  • 442
6
votes
2 answers

Subclass of XMLParser crashes with the contentsOfURL initializer if there isn't connectivity, Internet or otherwise, to get the contents of the URL

I'm trying to sort out an issue where a feed parsing framework (FeedKit) crashes if there is no connectivity to get the contents of the specified URL (e.g. the app is offline). So, it works when the App is online, and online only. Whenever I try to…
nmdias
  • 3,888
  • 5
  • 36
  • 59
6
votes
1 answer

How to set a delegate in a different class

I'm working with NSXMLParser that parses a xml document. You have to set the delegate which we would be called every time the parser finds an element. The examples I've looked at all set the delegate to be the same class that's…
gvalero87
  • 855
  • 3
  • 15
  • 32
1
2
3
84 85