code: function(data) {
          if(typeof data == "string") {
              data = OpenLayers.Format.XML.prototype.read.apply(this, [data]);
          }
          var root = data.documentElement;
          this.rootPrefix = root.prefix;
          var context = {
              version: root.getAttribute("version")
          };
          this.runChildNodes(context, root);
          return context;
      }
docs: Method: read
  Read capabilities data from a string, and return a list of layers.
  
  Parameters:
  data - {String} or {DOMElement} data to read/parse.
  
  Returns:
  {Array} List of named layers.