code: function serializeSingleElement(oElement) {
  		var oAttribute,
  			oAttributesList = oElement.attributes,
  			sText = "<" + oElement.nodeName,
  			i, n;
  
  		for (i = 0, n = oAttributesList.length; i < n; i += 1) {
  			oAttribute = oAttributesList.item(i);
  			sText += " " + oAttribute.name + '="' + oAttribute.value + '"';
  		}
  		return sText + (oElement.childNodes.length ? ">" : "/>");
  	}
docs: Serializes the element with its attributes.
  <p>
  BEWARE: makes no attempt at encoding, DO NOT use in a security critical manner!
  
  @param {Element} oElement any XML DOM element
  @returns {string} the serialization