code: function(node) {
          var simple = false,
              complex = false;
              
          var type = OpenLayers.Format.XML.CONTENT_TYPE.EMPTY;
  
          for(var child=node.firstChild; child; child=child.nextSibling) {
              switch(child.nodeType) {
                  case 1: // element
                      complex = true;
                      break;
                  case 8: // comment
                      break;
                  default:
                      simple = true;
              }
              if(complex && simple) {
                  break;
              }
          }
          
          if(complex && simple) {
              type = OpenLayers.Format.XML.CONTENT_TYPE.MIXED;
          } else if(complex) {
              return OpenLayers.Format.XML.CONTENT_TYPE.COMPLEX;
          } else if(simple) {
              return OpenLayers.Format.XML.CONTENT_TYPE.SIMPLE;
          }
          return type;
      }
docs: APIMethod: contentType
  Determine the content type for a given node.
  
  Parameters:
  node - {DOMElement}
  
  Returns:
  {Integer} One of OpenLayers.Format.XML.CONTENT_TYPE.{EMPTY,SIMPLE,COMPLEX,MIXED}
  if the node has no, simple, complex, or mixed content.