i am creating an app in which i want to take xmldata using webservices.
i am using NSXMLParser.
i get the data in respond data when this below method calling
-(void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data
{
//NSLog(@”====== Connection ========”);
[catalogData appendData:data];
//NSLog(@”catalog data-=-=-=-=-=-=-%@”, catalogData);
}
but when i parse this catalogData in finishloading method i get the null array.
i don’t know what the problem is,
this is my XML data
3
1
1
<sPagRichiestaFornitore>
</sPagRichiestaFornitore>
<idCategoria>1</idCategoria>
NSLog your data inside connectionfinishloading then. If you get a proper XML, then you can create the XML parser accordingly.
You can refer the Top Paid Sample app of apple for the NSXMLParser Implementation.