code: function(node) {
          var data;
          if(this.xmldom) {
              data = node.xml;
          } else {
              var serializer = new XMLSerializer();
              if (node.nodeType == 1) {
                  // Add nodes to a document before serializing. Everything else
                  // is serialized as is. This may need more work. See #1218 .
                  var doc = document.implementation.createDocument("", "", null);
                  if (doc.importNode) {
                      node = doc.importNode(node, true);
                  }
                  doc.appendChild(node);
                  data = serializer.serializeToString(doc);
              } else {
                  data = serializer.serializeToString(node);
              }
          }
          return data;
      }
docs: APIMethod: write
  Serialize a DOM node into a XML string.
  
  Parameters:
  node - {DOMElement} A DOM node.
  
  Returns:
  {String} The XML string representation of the input node.