microformat-shiv.js
function( node ) {
			var out = '',
				j = 0;

			// if node is a text node get its text
			if(node.nodeType && node.nodeType === 3){
				//out += modules.domUtils.getElementText( node );
				var containerNode = modules.domUtils.createNode('div');
				modules.domUtils.appendChild(containerNode, modules.domUtils.clone(node));
				out += modules.domUtils.innerHTML(containerNode);
			}


			// exclude text which has been added with include pattern  -
			if(node.nodeType && node.nodeType === 1 && modules.domUtils.hasAttribute(node, 'data-include') === false){

				// begin tag
				out += '<' + node.tagName.toLowerCase();

				// add attributes
				var attrs = modules.domUtils.getOrderedAttributes(node);
				for (j = 0; j < attrs.length; j++) {
					out += ' ' + attrs[j].name +  '=' + '"' + attrs[j].value + '"';
				}

				if(this.selfClosingElt.indexOf(node.tagName.toLowerCase()) === -1){
					out += '>';
				}

				// get the text of the child nodes
				if(node.childNodes && node.childNodes.length > 0){

					for (j = 0; j < node.childNodes.length; j++) {
						var text = this.walkTreeForHtml( node.childNodes[j] );
						if(text !== undefined){
							out += text;
						}
					}
				}

				// end tag
				if(this.selfClosingElt.indexOf(node.tagName.toLowerCase()) > -1){
					out += ' />';
				}else{
					out += '</' + node.tagName.toLowerCase() + '>';
				}
			}

			return (out === '')? undefined : out;
		}
function( node ) {
			var out = '',
				j = 0;

			// if node is a text node get its text
			if(node.nodeType && node.nodeType === 3){
				//out += modules.domUtils.getElementText( node );
				var containerNode = modules.domUtils.createNode('div');
				modules.domUtils.appendChild(containerNode, modules.domUtils.clone(node));
				out += modules.domUtils.innerHTML(containerNode);
			}


			// exclude text which has been added with include pattern  -
			if(node.nodeType && node.nodeType === 1 && modules.domUtils.hasAttribute(node, 'data-include') === false){

				// begin tag
				out += '<' + node.tagName.toLowerCase();

				// add attributes
				var attrs = modules.domUtils.getOrderedAttributes(node);
				for (j = 0; j < attrs.length; j++) {
					out += ' ' + attrs[j].name +  '=' + '"' + attrs[j].value + '"';
				}

				if(this.selfClosingElt.indexOf(node.tagName.toLowerCase()) === -1){
					out += '>';
				}

				// get the text of the child nodes
				if(node.childNodes && node.childNodes.length > 0){

					for (j = 0; j < node.childNodes.length; j++) {
						var text = this.walkTreeForHtml( node.childNodes[j] );
						if(text !== undefined){
							out += text;
						}
					}
				}

				// end tag
				if(this.selfClosingElt.indexOf(node.tagName.toLowerCase()) > -1){
					out += ' />';
				}else{
					out += '</' + node.tagName.toLowerCase() + '>';
				}
			}

			return (out === '')? undefined : out;
		}
function ( node ) { var out = '' , j = 0 ; // if node is a text node get its text if ( node . nodeType && node . nodeType === 3 ) { //out += modules.domUtils.getElementText( node ); var containerNode = modules . domUtils . createNode ( 'div' ) ; modules . domUtils . appendChild ( containerNode , modules . domUtils . clone ( node ) ) ; out += modules . domUtils . innerHTML ( containerNode ) ; } // exclude text which has been added with include pattern  - if ( node . nodeType && node . nodeType === 1 && modules . domUtils . hasAttribute ( node , 'data-include' ) === false ) { // begin tag out += '<' + node . tagName . toLowerCase ( ) ; // add attributes var attrs = modules . domUtils . getOrderedAttributes ( node ) ; for ( j = 0 ; j < attrs . length ; j ++ ) { out += ' ' + attrs [ j ] . name + '=' + '"' + attrs [ j ] . value + '"' ; } if ( this . selfClosingElt . indexOf ( node . tagName . toLowerCase ( ) ) === - 1 ) { out += '>' ; } // get the text of the child nodes if ( node . childNodes && node . childNodes . length > 0 ) { for ( j = 0 ; j < node . childNodes . length ; j ++ ) { var text = this . walkTreeForHtml ( node . childNodes [ j ] ) ; if ( text !== undefined ) { out += text ; } } } // end tag if ( this . selfClosingElt . indexOf ( node . tagName . toLowerCase ( ) ) > - 1 ) { out += ' />' ; } else { out += '</' + node . tagName . toLowerCase ( ) + '>' ; } } return ( out === '' ) ? undefined : out ; }
walks the DOM tree parsing the html string from the nodes

@param  {DOM Document} doc
@param  {DOM Node} node
@return {String}
walks the DOM tree parsing the html string from the nodes