VarunJi
VarunJi

Reputation: 694

Setting delegate for NSXMLParser giving error for SIGABRT

I am using following code for applying delegate for XML Parsing

NSXMLParser *nsXMLParse = [[NSXMLParser alloc] initWithData:data];    
XMLParse *parser = [[XMLParse alloc] initXMLParser];//XMLParse is my custom class, where i used the NSXMLParser protocol 
[nsXMLParse setDelegate:(id <NSXMLParserDelegate>)parser];

But this is not working properly. Although its not giving any error here, but its Giving "signal SIGABRT" Error, while Compiling. So please help.

My XML is:

 <?xml version="1.0" encoding="UTF-8"?>
    <Users>
      <User name="Some One" id="[email protected]" pass="123"/>
    </Users>

Upvotes: 0

Views: 158

Answers (1)

Fruity Geek
Fruity Geek

Reputation: 7381

You don't need to cast to id if XMLParse class implements the NSXMLParserDelegate protocol.

Upvotes: 1

Related Questions