setBodyFromXml method
Sets str as XML, changes the media type to text/xml, and selects a
transfer encoding appropriate for the text. For ASCII input, Chilkat uses
7bit and does not add a charset.
The XML declaration's encoding value is not copied to the MIME charset
parameter.
Different from LoadXml. This method places an XML document in the MIME body. loadXml reconstructs an entire MIME object from Chilkat MIME XML.
Throws a ChilkatException if the call fails; the details are in ChilkatException.lastErrorText. Throws an ArgumentError if a string argument contains a NUL character.
Implementation
void setBodyFromXml(String str) {
final h = _handle;
using((arena) {
final r = _CkMime_SetBodyFromXml(h, _toNative(arena, str, 'str'));
if (r == 0) {
throw _fail('setBodyFromXml');
}
});
}