Sample code for 30+ languages & platforms
Objective-C

Convert HTML File to XML File

See more HTML-to-XML/Text Examples

Convert HTML file to XML file.

Chilkat Objective-C Downloads

Objective-C
#import <CkoHtmlToXml.h>

BOOL success = NO;

// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.

CkoHtmlToXml *htmlToXml = [[CkoHtmlToXml alloc] init];

// Indicate the charset of the output XML we'll want.
htmlToXml.XmlCharset = @"utf-8";

success = [htmlToXml ConvertFile: @"test.html" destXmlPath: @"out.xml"];
if (success != YES) {
    NSLog(@"%@",htmlToXml.LastErrorText);
}
else {
    NSLog(@"%@",@"Success");
}