+ /**\r
+ * returns extracted, type-cast rows of data. Iterates to call #extractValues for each row\r
+ * @param {Object[]/Object} data-root from server response\r
+ * @param {Boolean} returnRecords [false] Set true to return instances of Ext.data.Record\r
+ * @private\r
+ */\r
+ extractData : function(root, returnRecords) {\r
+ // A bit ugly this, too bad the Record's raw data couldn't be saved in a common property named "raw" or something.\r
+ var rawName = (this instanceof Ext.data.JsonReader) ? 'json' : 'node';\r
+\r
+ var rs = [];\r
+\r
+ // Had to add Check for XmlReader, #isData returns true if root is an Xml-object. Want to check in order to re-factor\r
+ // #extractData into DataReader base, since the implementations are almost identical for JsonReader, XmlReader\r
+ if (this.isData(root) && !(this instanceof Ext.data.XmlReader)) {\r
+ root = [root];\r
+ }\r
+ var f = this.recordType.prototype.fields,\r
+ fi = f.items,\r
+ fl = f.length,\r
+ rs = [];\r
+ if (returnRecords === true) {\r
+ var Record = this.recordType;\r
+ for (var i = 0; i < root.length; i++) {\r
+ var n = root[i];\r
+ var record = new Record(this.extractValues(n, fi, fl), this.getId(n));\r
+ record[rawName] = n; // <-- There's implementation of ugly bit, setting the raw record-data.\r
+ rs.push(record);\r
+ }\r
+ }\r
+ else {\r
+ for (var i = 0; i < root.length; i++) {\r
+ var data = this.extractValues(root[i], fi, fl);\r
+ data[this.meta.idProperty] = this.getId(root[i]);\r
+ rs.push(data);\r
+ }\r
+ }\r
+ return rs;\r
+ },\r
+\r