toXml method
XmlDocument
toXml()
Implementation
XmlDocument toXml() {
final XmlBuilder builder = XmlBuilder();
builder.element('AccessControlPolicy', nest: () {
if (owner != null) {
builder.xml(owner!.toXmlString());
}
builder.element('AccessControlList', nest: () {
accessControlList?.forEach((COSGrant grant) {
builder.xml(grant.toXmlString());
});
});
});
return builder.buildDocument();
}