anchor.diff:   */
   class XmlBuilder {
   
  -  _XmlNodeBuilder _current = new _XmlDocumentBuilder();
  +  final List<_XmlNodeBuilder> _stack = new List.from([new _XmlDocumentBuilder()]);
   
     /**
      * Adds a [XmlText] node with the provided `text`.
      */
     void text(String text) {
  -    _current.children.add(new XmlText(text));
  +    _stack.last.children.add(new XmlText(text));
     }
   
     /**
      * Adds a [XmlCDATA] node with the provided `text`.
      */
     void cdata(String text) {
  -    _current.children.add(new XmlCDATA(text));
  +    _stack.last.children.add(new XmlCDATA(text));
     }
   
     /**
      * Adds a [XmlProcessing] node with the provided `target` and `text`.
      */
     void processing(String target, String text) {
  -    _current.children.add(new XmlProcessing(target, text));
  +    _stack.last.children.add(new XmlProcessing(target, text));
     }
   
     /**
      * Adds a [XmlComment] node with the provided `text`.
      */
     void comment(String text) {
  -    _current.children.add(new XmlComment(text));
  +    _stack.last.children.add(new XmlComment(text));
     }
   
     /**
  
positive.code:       Map<String, String> namespaces: const {},
        Map<String, String> attributes: const {},
        Object nest: null}) {
      var builder = new _XmlElementBuilder(_current);
      _current = builder;
      namespaces.forEach(this.namespace);
      attributes.forEach(this.attribute);
      if (nest != null) {
        _insert(nest);
      }
      builder.name = _buildName(name, namespace);
      _current = builder.parent;
      _current.children.add(builder.build());
    }
  
    /**
     * Adds a [XmlAttribute] node with the provided `name` and `value`.
     */
    void attribute(String name, String value, {String namespace}) {
      _current.attributes.add(new XmlAttribute(_buildName(name, namespace), value));
    }
  
    /**
  
negative.code:     if (prefix == _XMLNS || prefix == _XML) {
        throw new ArgumentError('The "$prefix" prefix cannot be bound.');
      }
      if (_stack.last.namespaces.containsValue(prefix)) {
        throw new ArgumentError('The "$prefix" prefix conflicts with existing binding.');
      }
      var name = prefix == null || prefix.isEmpty
          ? new XmlName(_XMLNS)
          : new XmlName(prefix, _XMLNS);
      _stack.last.attributes.add(new XmlAttribute(name, uri));
      _stack.last.namespaces[uri] = prefix;
    }
  
    /**
     * Returns the resulting [XmlNode].
     */
    XmlNode build() => _stack.last.build();
  
    // Internal method to build a name.
    XmlName _buildName(String name, String uri) {
      return uri == null || uri.isEmpty
          ? new XmlName.fromString(name)
          : new XmlName(name, _lookup(uri));
    }
  
    // Internal method to lookup an uri prefix.
    String _lookup(String uri) {
      var builder = _stack.lastWhere(
        (builder) => builder.namespaces.containsKey(uri),
        orElse: () => throw new ArgumentError('Undefined namespace: $uri'));
      return builder.namespaces[uri];
    }
  
    // Internal method to add something to the current element.
    void _insert(Object value) {
      if (value is Function) {
        value();
  