X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/7a654f8d43fdb43d78b63d90528bed6e86b608cc..6746dc89c47ed01b165cc1152533605f97eb8e8d:/docs/source/Xml.html diff --git a/docs/source/Xml.html b/docs/source/Xml.html index 513ba280..6c9f8be8 100644 --- a/docs/source/Xml.html +++ b/docs/source/Xml.html @@ -1,4 +1,21 @@ -Sencha Documentation Project
/**
+
+
+
+  
+  The source code
+  
+  
+  
+  
+
+
+  
/**
  * @author Ed Spencer
  * @class Ext.data.reader.Xml
  * @extends Ext.data.reader.Reader
@@ -168,53 +185,38 @@ Ext.define('Ext.data.reader.Xml', {
     alternateClassName: 'Ext.data.XmlReader',
     alias : 'reader.xml',
     
-    /**
+    /**
+     * @cfg {String} record The DomQuery path to the repeated element which contains record information.
+     */
+
+    /**
      * @private
      * Creates a function to return some particular key of data from a response. The totalProperty and
      * successProperty are treated as special cases for type casting, everything else is just a simple selector.
      * @param {String} key
      * @return {Function}
      */
-
-    /**
-     * @cfg {String} record The DomQuery path to the repeated element which contains record information.
-     */
-
-    createAccessor: function() {
-        var selectValue = function(expr, root){
-            var node = Ext.DomQuery.selectNode(expr, root),
-                val;
-                
-            
-            
-        };
-
-        return function(expr) {
-            var me = this;
-            
-            if (Ext.isEmpty(expr)) {
-                return Ext.emptyFn;
-            }
-            
-            if (Ext.isFunction(expr)) {
-                return expr;
-            }
-            
-            return function(root) {
-                var node = Ext.DomQuery.selectNode(expr, root),
-                    val = me.getNodeValue(node);
-                    
-                return Ext.isEmpty(val) ? null : val;
-            };
+    createAccessor: function(expr) {
+        var me = this;
+        
+        if (Ext.isEmpty(expr)) {
+            return Ext.emptyFn;
+        }
+        
+        if (Ext.isFunction(expr)) {
+            return expr;
+        }
+        
+        return function(root) {
+            return me.getNodeValue(Ext.DomQuery.selectNode(expr, root));
         };
-    }(),
+    },
     
     getNodeValue: function(node) {
-        var val;
         if (node && node.firstChild) {
-            val = node.firstChild.nodeValue;
+            return node.firstChild.nodeValue;
         }
-        return val || null;
+        return undefined;
     },
 
     //inherit docs
@@ -233,7 +235,7 @@ Ext.define('Ext.data.reader.Xml', {
         return xml;
     },
 
-    /**
+    /**
      * Normalizes the data object
      * @param {Object} data The raw data object
      * @return {Object} Returns the documentElement property of the data object if present, or the same object if not
@@ -242,7 +244,7 @@ Ext.define('Ext.data.reader.Xml', {
         return data.documentElement || data;
     },
 
-    /**
+    /**
      * @private
      * Given an XML object, returns the Element that represents the root as configured by the Reader's meta data
      * @param {Object} data The XML data object
@@ -262,7 +264,7 @@ Ext.define('Ext.data.reader.Xml', {
         }
     },
 
-    /**
+    /**
      * @private
      * We're just preparing the data for the superclass by pulling out the record nodes we want
      * @param {Element} root The XML root node
@@ -285,7 +287,7 @@ Ext.define('Ext.data.reader.Xml', {
         return this.callParent([root]);
     },
     
-    /**
+    /**
      * @private
      * See Ext.data.reader.Reader's getAssociatedDataRoot docs
      * @param {Mixed} data The raw data object
@@ -296,7 +298,7 @@ Ext.define('Ext.data.reader.Xml', {
         return Ext.DomQuery.select(associationName, data)[0];
     },
 
-    /**
+    /**
      * Parses an XML document and returns a ResultSet containing the model instances
      * @param {Object} doc Parsed XML document
      * @return {Ext.data.ResultSet} The parsed result set
@@ -307,7 +309,7 @@ Ext.define('Ext.data.reader.Xml', {
             doc = doc[0];
         }
         
-        /**
+        /**
          * DEPRECATED - will be removed in Ext JS 5.0. This is just a copy of this.rawData - use that instead
          * @property xmlData
          * @type Object
@@ -315,5 +317,6 @@ Ext.define('Ext.data.reader.Xml', {
         this.xmlData = doc;
         return this.callParent([doc]);
     }
-});
-
\ No newline at end of file +});
+ +