public/javascripts/yui/datasource/datasource-debug.js
function(oRequest, oFullResponse) {
    var bError = false,
        schema = this.responseSchema,
        oParsedResponse = {meta:{}},
        xmlList = null,
        metaNode      = schema.metaNode,
        metaLocators  = schema.metaFields || {},
        i,k,loc,v;

    // In case oFullResponse is something funky
    try {
        // Pull any meta identified
        if(this.useXPath) {
            for (k in metaLocators) {
                oParsedResponse.meta[k] = YAHOO.util.DataSource._getLocationValue(metaLocators[k], oFullResponse);
            }
        }
        else {
            metaNode = metaNode ? oFullResponse.getElementsByTagName(metaNode)[0] :
                       oFullResponse;

            if (metaNode) {
                for (k in metaLocators) {
                    if (lang.hasOwnProperty(metaLocators, k)) {
                        loc = metaLocators[k];
                        // Look for a node
                        v = metaNode.getElementsByTagName(loc)[0];

                        if (v) {
                            v = v.firstChild.nodeValue;
                        } else {
                            // Look for an attribute
                            v = metaNode.attributes.getNamedItem(loc);
                            if (v) {
                                v = v.value;
                            }
                        }

                        if (lang.isValue(v)) {
                            oParsedResponse.meta[k] = v;
                        }
                    }
                }
            }
        }
        
        // For result data
        xmlList = (schema.resultNode) ?
            oFullResponse.getElementsByTagName(schema.resultNode) :
            null;
    }
    catch(e) {
        YAHOO.log("Error while parsing XML data: " + e.message);
    }
    if(!xmlList || !lang.isArray(schema.fields)) {
        bError = true;
    }
    // Loop through each result
    else {
        oParsedResponse.results = [];
        for(i = xmlList.length-1; i >= 0 ; --i) {
            var oResult = this.parseXMLResult(xmlList.item(i));
            // Capture each array of values into an array of results
            oParsedResponse.results[i] = oResult;
        }
    }
    if(bError) {
        YAHOO.log("XML data could not be parsed: " +
                lang.dump(oFullResponse), "error", this.toString());
        oParsedResponse.error = true;
    }
    else {
        YAHOO.log("Parsed XML data is " +
                lang.dump(oParsedResponse), "info", this.toString());
    }
    return oParsedResponse;
}
function(oRequest, oFullResponse) {
    var bError = false,
        schema = this.responseSchema,
        oParsedResponse = {meta:{}},
        xmlList = null,
        metaNode      = schema.metaNode,
        metaLocators  = schema.metaFields || {},
        i,k,loc,v;

    // In case oFullResponse is something funky
    try {
        // Pull any meta identified
        if(this.useXPath) {
            for (k in metaLocators) {
                oParsedResponse.meta[k] = YAHOO.util.DataSource._getLocationValue(metaLocators[k], oFullResponse);
            }
        }
        else {
            metaNode = metaNode ? oFullResponse.getElementsByTagName(metaNode)[0] :
                       oFullResponse;

            if (metaNode) {
                for (k in metaLocators) {
                    if (lang.hasOwnProperty(metaLocators, k)) {
                        loc = metaLocators[k];
                        // Look for a node
                        v = metaNode.getElementsByTagName(loc)[0];

                        if (v) {
                            v = v.firstChild.nodeValue;
                        } else {
                            // Look for an attribute
                            v = metaNode.attributes.getNamedItem(loc);
                            if (v) {
                                v = v.value;
                            }
                        }

                        if (lang.isValue(v)) {
                            oParsedResponse.meta[k] = v;
                        }
                    }
                }
            }
        }
        
        // For result data
        xmlList = (schema.resultNode) ?
            oFullResponse.getElementsByTagName(schema.resultNode) :
            null;
    }
    catch(e) {
        YAHOO.log("Error while parsing XML data: " + e.message);
    }
    if(!xmlList || !lang.isArray(schema.fields)) {
        bError = true;
    }
    // Loop through each result
    else {
        oParsedResponse.results = [];
        for(i = xmlList.length-1; i >= 0 ; --i) {
            var oResult = this.parseXMLResult(xmlList.item(i));
            // Capture each array of values into an array of results
            oParsedResponse.results[i] = oResult;
        }
    }
    if(bError) {
        YAHOO.log("XML data could not be parsed: " +
                lang.dump(oFullResponse), "error", this.toString());
        oParsedResponse.error = true;
    }
    else {
        YAHOO.log("Parsed XML data is " +
                lang.dump(oParsedResponse), "info", this.toString());
    }
    return oParsedResponse;
}
function ( oRequest , oFullResponse ) { var bError = false , schema = this . responseSchema , oParsedResponse = { meta : { } } , xmlList = null , metaNode = schema . metaNode , metaLocators = schema . metaFields || { } , i , k , loc , v ; // In case oFullResponse is something funky try { // Pull any meta identified if ( this . useXPath ) { for ( k in metaLocators ) { oParsedResponse . meta [ k ] = YAHOO . util . DataSource . _getLocationValue ( metaLocators [ k ] , oFullResponse ) ; } } else { metaNode = metaNode ? oFullResponse . getElementsByTagName ( metaNode ) [ 0 ] : oFullResponse ; if ( metaNode ) { for ( k in metaLocators ) { if ( lang . hasOwnProperty ( metaLocators , k ) ) { loc = metaLocators [ k ] ; // Look for a node v = metaNode . getElementsByTagName ( loc ) [ 0 ] ; if ( v ) { v = v . firstChild . nodeValue ; } else { // Look for an attribute v = metaNode . attributes . getNamedItem ( loc ) ; if ( v ) { v = v . value ; } } if ( lang . isValue ( v ) ) { oParsedResponse . meta [ k ] = v ; } } } } } // For result data xmlList = ( schema . resultNode ) ? oFullResponse . getElementsByTagName ( schema . resultNode ) : null ; } catch ( e ) { YAHOO . log ( "Error while parsing XML data: " + e . message ) ; } if ( ! xmlList || ! lang . isArray ( schema . fields ) ) { bError = true ; } // Loop through each result else { oParsedResponse . results = [ ] ; for ( i = xmlList . length - 1 ; i >= 0 ; -- i ) { var oResult = this . parseXMLResult ( xmlList . item ( i ) ) ; // Capture each array of values into an array of results oParsedResponse . results [ i ] = oResult ; } } if ( bError ) { YAHOO . log ( "XML data could not be parsed: " + lang . dump ( oFullResponse ) , "error" , this . toString ( ) ) ; oParsedResponse . error = true ; } else { YAHOO . log ( "Parsed XML data is " + lang . dump ( oParsedResponse ) , "info" , this . toString ( ) ) ; } return oParsedResponse ; }
Overridable method parses XML data into a response object.

@method parseXMLData
@param oRequest {Object} Request object.
@param oFullResponse {Object} The full XML response from the live database.
@return {Object} Parsed response object with the following properties<br>
- results (Array) Array of parsed data results<br>
- error (Boolean) True if there was an error
Overridable method parses XML data into a response object .