nsxmlparsererrordomain

Error Domain=NSXMLParserErrorDomain Code=64 “The operation couldn’t be completed. (NSXMLParserErrorDomain error 64.)”

ぐ巨炮叔叔 提交于 2019-12-20 06:29:19
问题 What deos the error 64 in NSXMLParserDomain Code=64 mean? I am using an NSXMLParser to parse my XML data. But i am getting the above mentioned error. Can someone please help me on this? 回答1: I found it out. The error comes when the XMl contains errors at the start up. U can validate the XMl using w3schools here http://www.w3schools.com/xml/xml_validator.aspHow to validate an XML 回答2: Its also happens if the XML contains some extra line before the xml tag starts. 来源: https://stackoverflow.com

NSXMLParserErrorDomain 111

≯℡__Kan透↙ 提交于 2019-12-19 21:24:13
问题 The code below is printing the following message: Error Domain=NSXMLParserErrorDomain Code=111 "The operation couldn’t be completed. (NSXMLParserErrorDomain error 111.) mainUrl = [NSURL URLWithString:@"http://www.carris.pt/pt/carreiras"]; NSString *urlContents = [NSString stringWithContentsOfURL:mainUrl encoding:NSISOLatin1StringEncoding error:nil]; NSXMLParser *xmlParser = [[NSXMLParser alloc] initWithData:[urlContents dataUsingEncoding:NSISOLatin1StringEncoding]]; [xmlParser parse]; NSLog(@

XML Parsing - NSXMLParserErrorDomain error 5

落爺英雄遲暮 提交于 2019-12-11 17:39:36
问题 I'm trying to parse a XML File. It worked very well - until today... Here's how I start to parse the XML: NSString *link = [[NSString alloc] init]; link = @"link_to_xml_file"; NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:link] cachePolicy:NSURLRequestReturnCacheDataElseLoad timeoutInterval:30.0]; connection = [[NSURLConnection alloc] initWithRequest:request delegate:self]; And here's how I'm using the received data: - (void)connection:(NSURLConnection *

NSXMLParserErrorDomain 111

纵然是瞬间 提交于 2019-12-01 19:16:53
The code below is printing the following message: Error Domain=NSXMLParserErrorDomain Code=111 "The operation couldn’t be completed. (NSXMLParserErrorDomain error 111.) mainUrl = [NSURL URLWithString:@"http://www.carris.pt/pt/carreiras"]; NSString *urlContents = [NSString stringWithContentsOfURL:mainUrl encoding:NSISOLatin1StringEncoding error:nil]; NSXMLParser *xmlParser = [[NSXMLParser alloc] initWithData:[urlContents dataUsingEncoding:NSISOLatin1StringEncoding]]; [xmlParser parse]; NSLog(@"%@", [xmlParser parserError]); Anybody have a clue? As you can see by the code, the html is with ISO