Swift
Swift
Transition from MailMan.LoadXmlString to EmailBundle.LoadXmlString
Provides instructions for replacing deprecated LoadXmlString method calls with EmailBundle.LoadXmlString.Chilkat Swift Downloads
func chilkatTest() {
var success: Bool = false
let mailman = CkoMailMan()!
// ...
// ...
var xmlBundleStr: String? = "..."
// ------------------------------------------------------------------------
// The LoadXmlString method is deprecated:
var bundleObj: CkoEmailBundle? = mailman.loadXmlString(xmlString: xmlBundleStr)
if mailman.lastMethodSuccess == false {
print("\(mailman.lastErrorText!)")
return
}
// ...
// ...
bundleObj = nil
// ------------------------------------------------------------------------
// Do the equivalent using EmailBundle.LoadXmlString.
let bundle = CkoEmailBundle()!
success = bundle.loadXmlString(xmlStr: xmlBundleStr)
if success == false {
print("\(bundle.lastErrorText!)")
return
}
}