lib/xml-stream.js
function emitElement(element, name, onLeave) {
  if (Array.isArray(element)) {
    var i;
    for (i = 0; i < element.length - 1; i++) {
      emitOneElement.call(this, element[i], name);
    }
    emitOneElement.call(this, element[i], name, onLeave);
  } else {
    emitOneElement.call(this, element, name, onLeave);
  }
}
function emitElement(element, name, onLeave) {
  if (Array.isArray(element)) {
    var i;
    for (i = 0; i < element.length - 1; i++) {
      emitOneElement.call(this, element[i], name);
    }
    emitOneElement.call(this, element[i], name, onLeave);
  } else {
    emitOneElement.call(this, element, name, onLeave);
  }
}
function emitElement ( element , name , onLeave ) { if ( Array . isArray ( element ) ) { var i ; for ( i = 0 ; i < element . length - 1 ; i ++ ) { emitOneElement . call ( this , element [ i ] , name ) ; } emitOneElement . call ( this , element [ i ] , name , onLeave ) ; } else { emitOneElement . call ( this , element , name , onLeave ) ; } }
Emits a single element and its descendants, or an array of elements.
Emits a single element and its descendants or an array of elements .