code: function(data) {
          if(typeof data == "string") {
              data = OpenLayers.Format.XML.prototype.read.apply(this, [data]);
          }
          if(data && data.nodeType == 9) {
              data = data.documentElement;
          }
          var context = {};
          this.readNode(data, context);
          // since an OWSContext can be nested we need to go through this
          // structure recursively      
          this.setNestingPath({layersContext : context.layersContext});
          // after nesting path has been set, create a flat list of layers
          var layers = [];
          this.processLayer(layers, context);
          delete context.layersContext;
          context.layersContext = layers;
          return context;
      }
docs: APIMethod: read
  Read OWS context data from a string or DOMElement, and return a list
  of layers.
  
  Parameters:
  data - {String} or {DOMElement} data to read/parse.
  
  Returns:
  {Object} The context object with a flat layer list as a property named
  layersContext.