toXml method
Implementation
@override
void toXml(XmlBuilder context, NamespaceManager nsmgr) {
const davns = kDavNamespaceUrlStr;
nsmgr.generate(davns);
for (var p in operations) {
final ns = p.namespace;
if (ns != null) nsmgr.generate(ns);
}
context.element(
WebDavElementNames.propertyupdate,
namespace: davns,
namespaces: Map.fromEntries(nsmgr.all),
nest: () {
for (var groupPiece in groupPropsByOp(_operations)) {
context.element(
groupPiece.op.name,
namespace: davns,
nest: () {
context.element(WebDavElementNames.prop, namespace: davns,
nest: () {
for (var prop in groupPiece.props) {
prop.toXml(context, nsmgr);
}
});
},
);
}
},
);
}