jsonml-html.js
function(elem) {
		if (elem) {
			while (isWhitespace(elem.firstChild)) {
				// trim leading whitespace text nodes
				elem.removeChild(elem.firstChild);
			}
			// trim leading whitespace text
			trimPattern(elem.firstChild, LEADING);
			while (isWhitespace(elem.lastChild)) {
				// trim trailing whitespace text nodes
				elem.removeChild(elem.lastChild);
			}
			// trim trailing whitespace text
			trimPattern(elem.lastChild, TRAILING);
		}
	}
function(elem) {
		if (elem) {
			while (isWhitespace(elem.firstChild)) {
				// trim leading whitespace text nodes
				elem.removeChild(elem.firstChild);
			}
			// trim leading whitespace text
			trimPattern(elem.firstChild, LEADING);
			while (isWhitespace(elem.lastChild)) {
				// trim trailing whitespace text nodes
				elem.removeChild(elem.lastChild);
			}
			// trim trailing whitespace text
			trimPattern(elem.lastChild, TRAILING);
		}
	}
function ( elem ) { if ( elem ) { while ( isWhitespace ( elem . firstChild ) ) { // trim leading whitespace text nodes
 elem . removeChild ( elem . firstChild ) ; } // trim leading whitespace text
 trimPattern ( elem . firstChild , LEADING ) ; while ( isWhitespace ( elem . lastChild ) ) { // trim trailing whitespace text nodes
 elem . removeChild ( elem . lastChild ) ; } // trim trailing whitespace text
 trimPattern ( elem . lastChild , TRAILING ) ; } }
Removes leading and trailing whitespace nodes

@private
@param {Node} elem The node
Removes leading and trailing whitespace nodes