code: function(node, tab, indent)
  	{
  		var result = [];
  		
  		if (node != null)
  		{
  			tab = tab || '  ';
  			indent = indent || '';
  			
  			if (node.nodeType == mxConstants.NODETYPE_TEXT)
  			{
  				result.push(node.value);
  			}
  			else
  			{
  				result.push(indent + '<' + node.nodeName);
  				
  				// Creates the string with the node attributes
  				// and converts all HTML entities in the values
  				var attrs = node.attributes;
  				
  				if (attrs != null)
  				{
  					for (var i = 0; i < attrs.length; i++)
  					{
  						var val = mxUtils.htmlEntities(attrs[i].value);
  						result.push(' ' + attrs[i].nodeName + '="' + val + '"');
  					}
  				}
  
  				// Recursively creates the XML string for each
  				// child nodes and appends it here with an
  				// indentation
  				var tmp = node.firstChild;
  				
  				if (tmp != null)
  				{
  					result.push('>\n');
  					
  					while (tmp != null)
  					{
  						result.push(mxUtils.getPrettyXml(tmp, tab, indent + tab));
  						tmp = tmp.nextSibling;
  					}
  					
  					result.push(indent + '</'+node.nodeName + '>\n');
  				}
  				else
  				{
  					result.push('/>\n');
  				}
  			}
  		}
  		
  		return result.join('');
  	}
docs: Function: getPrettyXML
  
  Returns a pretty printed string that represents the XML tree for the
  given node. This method should only be used to print XML for reading,
  use <getXml> instead to obtain a string for processing.
  
  Parameters:
  
  node - DOM node to return the XML for.
  tab - Optional string that specifies the indentation for one level.
  Default is two spaces.
  indent - Optional string that represents the current indentation.
  Default is an empty string.