Objective-C
Objective-C
Decode HTML Entities found in XML
Demonstrates how to decode HTML entities found in XML.Chilkat Objective-C Downloads
#import <CkoXml.h>
#import <NSString.h>
BOOL success = NO;
// Load an XML file containing the following:
// <?xml version="1.0" encoding="UTF-8"?>
// <output>Französische</output>
CkoXml *xml = [[CkoXml alloc] init];
success = [xml LoadXmlFile: @"qa_data/xml/hasHtmlEntity.xml"];
// Get non-decoded content, then get decoded content.
// Result is Französische
NSLog(@"%@",xml.Content);
// Result is Französische
NSString *strDecoded = [xml DecodeEntities: xml.Content];
NSLog(@"%@",strDecoded);