toXml method

  1. @override
void toXml(
  1. XmlBuilder context,
  2. NamespaceManager nsmgr
)
override

Implementation

@override
void toXml(XmlBuilder context, NamespaceManager nsmgr) {
  for (var type in _types) {
    final ns = type.ns;
    if (ns != null && !nsmgr.contain(ns)) nsmgr.generate(ns);
    if (ns != null) context.namespace(ns, nsmgr.getPrefix(ns));
    context.element(type.name, namespace: type.ns);
  }
}