(Objective-C) Transition from MailMan.LoadXmlString to EmailBundle.LoadXmlString
Provides instructions for replacing deprecated LoadXmlString method calls with EmailBundle.LoadXmlString. 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 *xmlBundleStr = @"...";
// ------------------------------------------------------------------------
// The LoadXmlString method is deprecated:
CkoEmailBundle *bundleObj = [mailman LoadXmlString: xmlBundleStr];
if (mailman.LastMethodSuccess == NO) {
NSLog(@"%@",mailman.LastErrorText);
return;
}
// ...
// ...
// ------------------------------------------------------------------------
// Do the equivalent using EmailBundle.LoadXmlString.
CkoEmailBundle *bundle = [[CkoEmailBundle alloc] init];
BOOL success = [bundle LoadXmlString: xmlBundleStr];
if (success == NO) {
NSLog(@"%@",bundle.LastErrorText);
return;
}
|