function printNode(n) 
{
    // since in IE style doesnt come out right, we can use outerHTML which is not too shabby
    if( n == null ) return "";
    if( n.outerHTML ) return n.outerHTML;

    var s = "<";
    s += n.tagName;

    var attrs = n.attributes;

    if( attrs && attrs.length > 0 ) {
	for(var i = 0; i < attrs.length; i++ ) {
	    if( attrs[i].specified ) {
		s += " " + attrs[i].nodeName + '="';
		s += attrs[i].nodeValue;
		s += '"';
	    }
	}
    }
    s += ">";

    if( n.childNodes ) {
	for( var i = 0; i < n.childNodes.length; i++ ) {
	    var c = n.childNodes[i];
	    if( c.nodeValue && !isWhite(c.nodeValue) ) 
		s += c.nodeValue;
	    if (c.nodeType != 1) continue;
	    else s += printNode(c);
	}
    }
    if ( n.nodeValue ) {
	s  += n.nodeValue;
    }
    s += "</";
    s += n.tagName;
    s += ">\n";
    return s;
}
/**
 * (for testing purposes) stringize a view element
 */
(for testing purposes) stringize a view element
( for testing purposes ) stringize a view element
function printNode(n) 
{
    if( n == null ) return "";
    if( n.outerHTML ) return n.outerHTML;
    var s = "<";
    s += n.tagName;
    var attrs = n.attributes;
    if( attrs && attrs.length > 0 ) {
	for(var i = 0; i < attrs.length; i++ ) {
	    if( attrs[i].specified ) {
		s += " " + attrs[i].nodeName + '="';
		s += attrs[i].nodeValue;
		s += '"';
	    }
	}
    }
    s += ">";
    if( n.childNodes ) {
	for( var i = 0; i < n.childNodes.length; i++ ) {
	    var c = n.childNodes[i];
	    if( c.nodeValue && !isWhite(c.nodeValue) ) 
		s += c.nodeValue;
	    if (c.nodeType != 1) continue;
	    else s += printNode(c);
	}
    }
    if ( n.nodeValue ) {
	s  += n.nodeValue;
    }
    s += "</";
    s += n.tagName;
    s += ">\n";
    return s;
}
function printNode ( n ) { if ( n == null ) return "" ; if ( n . outerHTML ) return n . outerHTML ; var s = "<" ; s += n . tagName ; var attrs = n . attributes ; if ( attrs && attrs . length > 0 ) { for ( var i = 0 ; i < attrs . length ; i ++ ) { if ( attrs [ i ] . specified ) { s += " " + attrs [ i ] . nodeName + '="' ; s += attrs [ i ] . nodeValue ; s += '"' ; } } } s += ">" ; if ( n . childNodes ) { for ( var i = 0 ; i < n . childNodes . length ; i ++ ) { var c = n . childNodes [ i ] ; if ( c . nodeValue && ! isWhite ( c . nodeValue ) ) s += c . nodeValue ; if ( c . nodeType != 1 ) continue ; else s += printNode ( c ) ; } } if ( n . nodeValue ) { s += n . nodeValue ; } s += "</" ; s += n . tagName ; s += ">\n" ; return s ; }
(for testing purposes) stringize a view element
( for testing purposes ) stringize a view element
// since in IE style doesnt come out right, we can use outerHTML which is not too shabby
