Sample code for 30+ languages & platforms
Objective-C

Decode HTML Entities found in XML

Demonstrates how to decode HTML entities found in XML.

Chilkat Objective-C Downloads

Objective-C
#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&#xf6;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&#xf6;sische
NSLog(@"%@",xml.Content);

//  Result is Französische
NSString *strDecoded = [xml DecodeEntities: xml.Content];
NSLog(@"%@",strDecoded);