lib/xmlutil.js
function(node) {
    var doc = '';
    var sibling = node.firstChild;
    var serializer = new XMLSerializer();

    while (sibling) {
      if (this.isElementNode(sibling)) {
        doc += serializer.serializeToString(sibling);
      }
      sibling = sibling.nextSibling;
    }

    return doc !== '' ? doc : null;
  }
function(node) {
    var doc = '';
    var sibling = node.firstChild;
    var serializer = new XMLSerializer();

    while (sibling) {
      if (this.isElementNode(sibling)) {
        doc += serializer.serializeToString(sibling);
      }
      sibling = sibling.nextSibling;
    }

    return doc !== '' ? doc : null;
  }
function ( node ) { var doc = '' ; var sibling = node . firstChild ; var serializer = new XMLSerializer ( ) ; while ( sibling ) { if ( this . isElementNode ( sibling ) ) { doc += serializer . serializeToString ( sibling ) ; } sibling = sibling . nextSibling ; } return doc !== '' ? doc : null ; }
Given a dom node serializes all immediate children that are xml elements.
@static
@memberOf XmlUtil
@param  {object} node  An xml dom node.
@return {string}       Serialized xml.
Given a dom node serializes all immediate children that are xml elements .