code: function build(xmlStream, model) {
    xmlStream.openNode(model.tag, model.$);
    if (model.c) {
      model.c.forEach(function(child) {
        build(xmlStream, child);
      });
    }
    if (model.t) {
      xmlStream.writeText(model.t);
    }
    xmlStream.closeNode();
  }
docs: var model = { tag: 'name', $: {attr: 'value'}, c: [ { tag: 'child' } ], t: 'some text' };