code: function XmlStream(stream, encoding) {
    events.EventEmitter.call(this);
    this._stream = stream;
    this._fa = new FiniteAutomata();
    this._lastState = 0;
    this._startState = {};
    this._finalStates = {};
    this._emitData = false;
    this._bufferLevel = 0;
    this._preserveLevel = 0;
    this._preserveWhitespace = 0;
    this._preserveAll = false;
    this._collect = false;
    this._parser = undefined;
  
    // Set input stream encoding and create an iconv instance,
    // if conversion is required. Default working encoding is UTF-8,
    // so iconv is used when input is anything else, but UTF-8.
    this._encoding = encoding || null;
    this._encoder = makeEncoder(this._encoding);
  
    var scope = this;
  
    // Start parsing.
    process.nextTick(function () {
      parse.call(scope);
    });
  }
docs: **XmlStream** is an XML stream filter based on Expat. It traverses a given stream and emits events for predefined selectors. Event listeners receive selected elements, context, and trace from root.