(Objective-C) Transition from MailMan.LoadXmlFile to EmailBundle.LoadXml
Provides instructions for replacing deprecated LoadXmlFile method calls with EmailBundle.LoadXml. Note: This example requires Chilkat v11.0.0 or greater.
#import <CkoMailMan.h>
#import <NSString.h>
#import <CkoEmailBundle.h>
CkoMailMan *mailman = [[CkoMailMan alloc] init];
// ...
// ...
NSString *filePath = @"c:/example/emailBundle.xml";
// ------------------------------------------------------------------------
// The LoadXmlFile method is deprecated:
CkoEmailBundle *bundleObj = [mailman LoadXmlFile: filePath];
if (mailman.LastMethodSuccess == NO) {
NSLog(@"%@",mailman.LastErrorText);
return;
}
// ...
// ...
// ------------------------------------------------------------------------
// Do the equivalent using EmailBundle.LoadXml.
CkoEmailBundle *bundle = [[CkoEmailBundle alloc] init];
BOOL success = [bundle LoadXml: filePath];
if (success == NO) {
NSLog(@"%@",bundle.LastErrorText);
return;
}
|