Nsxmlparser Error Code 64
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up NSXMLParserErrorDomain error 64 up vote 1 down vote favorite I have to call xml parsing I am receiving this error "NSXMLParserErrorDomain error 64", if I will parse dynamically I will get this error. statically parsing on that same xml I get my attribute values. If i will try another one server different request,url and response it will working properly the xml parsing and i am getting attribute values. ios nsxmlparsererrordomain share|improve this question edited Aug 26 '13 at 16:06 rmaddy 150k18183230 asked Aug 26 '13 at 10:55 Balaji 64 meaning of error 64 is given in iOS documentation. Please read it. –CodenameLambda1 Aug 26 '13 at 10:58 add a comment| 2 Answers 2 active oldest votes up vote 2 down vote Please check this link==>http://brandontreb.com/wordpress-for-iphoneipad-nsxmlparsererrordomain-error-64-resolved *After scouring the internet, I found that this could be the result of a few issues. 1) Special characters in a post body that are not supported by NSXMLParser 2) Special characters in a comment 3) Invalid post or comment RSS 4) An error in a theme/plugin file For me, this turned out to be an issue with the comments RSS feed. I loaded it up in the browser and long behold, even the browser threw an error. But what could be causing this? Turns out, I had left a space in a plugin that I created. This caused a space to be output at the beginning of the comments XML, causing it to error. Notice the space between ?> and After removing the space from this plugin, I loaded up WordPress for iPhone and it added my blog without a problem. So, the take away from this is don’t output spaces when you create a plugin.* Hope this helps you...:-) share|improve this answer answered Aug 26 '13 at 11:03 Master Stroke 3,5871548 add a comment| up vote 0 down vote In my case,
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up http://stackoverflow.com/questions/18442450/nsxmlparsererrordomain-error-64 NSXMLParser throws NSXMLParserErrorDomain #64 on up vote 1 down vote favorite 1 A NSXMLParserErrorDomain #64 is thrown by NSXMLParser if it finds the following line: Makes no difference if I initWithContentsOfUrl or initWithData. The xml is coming via a php5.3 apache system. If this line is omitted the document parses without error. We own the server so I can http://stackoverflow.com/questions/6726495/nsxmlparser-throws-nsxmlparsererrordomain-64-on-xml-version-1-0 filter this line out, but I'd rather fix the parser. ios cocoa-touch share|improve this question edited Jul 21 '11 at 9:59 Bavarious 54.6k13126148 asked Jul 17 '11 at 20:16 Mark Hamlin 977 It's probably worth pointing out that this error is an NSXMLParserMisplacedXMLDeclarationError. –Rob Keniger Jul 18 '11 at 5:43 add a comment| 2 Answers 2 active oldest votes up vote 1 down vote accepted Are you sure there's not some cruft on the line, like a byte order mark or other hidden characters? It's the only thing I could think of that would cause an error on that line, assuming of course this is the first line in the document? Also, adding encoding="UTF-8" might help, but again, it must be the very first line of the document, and watch for hidden characters, mistyped spaces (nbsp-s instead of spaces, etc.), and so on. share|improve this answer answered Jul 17 '11 at 20:23 Williham Totland 20.3k43461 Ur right...The Junk Values coming before the
here for a quick overview of the site Help Center Detailed answers to any http://stackoverflow.com/questions/5486116/xml-parsing-nsxmlparsererrordomain-error-5 questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack nsxmlparser error Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up XML Parsing - NSXMLParserErrorDomain error 5 up vote 0 down vote favorite I'm trying to parse a XML File. It worked very well - until today... Here's how I nsxmlparser error code 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 *)theConnection didReceiveData:(NSData *)incrementalData { if (data == nil) data = [[NSMutableData alloc] init]; [data appendData:incrementalData]; NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSString *filePath = [documentsDirectory stringByAppendingPathComponent:[NSString stringWithFormat:@"%@.plist",actual]]; NSError *parseError = nil; NSDictionary *xmlDictionary = [XMLReader dictionaryForXMLString:[[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding] error:&parseError]; if (parseError != nil) { UIAlertView *alert = [[UIAlertView alloc] initWithTitle:nil message:[parseError localizedDescription] delegate:nil cancelButtonTitle:@"Zurück" otherButtonTitles:nil]; [alert show]; [alert release]; } //shows an alertview with NSXMLParserErrorDomain error 5 NSLog(@"String: %@",[[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]); //returns null NSLog(@"Dictionary: %@",xmlDictionary); //returns null NSMutableDictionary *tempDictForAddDate = [[NSMutableDictionary alloc] initWithDictionary:xmlDictionary]; NSDateFormatter *originalDate = [[NSDateFormatter alloc] init]; [originalDate setDateFormat:@"dd.MM.yyyy"]; NSString *today = [originalDate stringFromDate:[NSDate date]]; [tempDictForAddDate setObject:today forKey:@"updated"]; [tempDictForAddDate writeToFile:filePath atomically:YES]; self.contentList = [[tempDictForAddDate objectForKey:@"xmlObject"]