www/build/tools/csslint-rhino.js
function(results) {

            function serializeToXML(results){
                var xml = "<" + results.type + " name=\"" + xmlEscape(results.name) + "\"";

                if (typeof(results.duration)=="number"){
                    xml += " duration=\"" + results.duration + "\"";
                }

                if (results.type == "test"){
                    xml += " result=\"" + results.result + "\" message=\"" + xmlEscape(results.message) + "\">";
                } else {
                    xml += " passed=\"" + results.passed + "\" failed=\"" + results.failed + "\" ignored=\"" + results.ignored + "\" total=\"" + results.total + "\">";
                    for (var prop in results){
                        if (results.hasOwnProperty(prop)){
                            if (results[prop] && typeof results[prop] == "object" && !(results[prop] instanceof Array)){
                                xml += serializeToXML(results[prop]);
                            }
                        }
                    }
                }

                xml += "</" + results.type + ">";

                return xml;
            }

            return "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + serializeToXML(results);

        }
function(results) {

            function serializeToXML(results){
                var xml = "<" + results.type + " name=\"" + xmlEscape(results.name) + "\"";

                if (typeof(results.duration)=="number"){
                    xml += " duration=\"" + results.duration + "\"";
                }

                if (results.type == "test"){
                    xml += " result=\"" + results.result + "\" message=\"" + xmlEscape(results.message) + "\">";
                } else {
                    xml += " passed=\"" + results.passed + "\" failed=\"" + results.failed + "\" ignored=\"" + results.ignored + "\" total=\"" + results.total + "\">";
                    for (var prop in results){
                        if (results.hasOwnProperty(prop)){
                            if (results[prop] && typeof results[prop] == "object" && !(results[prop] instanceof Array)){
                                xml += serializeToXML(results[prop]);
                            }
                        }
                    }
                }

                xml += "</" + results.type + ">";

                return xml;
            }

            return "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + serializeToXML(results);

        }
function ( results ) { function serializeToXML ( results ) { var xml = "<" + results . type + " name=\"" + xmlEscape ( results . name ) + "\"" ; if ( typeof ( results . duration ) == "number" ) { xml += " duration=\"" + results . duration + "\"" ; } if ( results . type == "test" ) { xml += " result=\"" + results . result + "\" message=\"" + xmlEscape ( results . message ) + "\">" ; } else { xml += " passed=\"" + results . passed + "\" failed=\"" + results . failed + "\" ignored=\"" + results . ignored + "\" total=\"" + results . total + "\">" ; for ( var prop in results ) { if ( results . hasOwnProperty ( prop ) ) { if ( results [ prop ] && typeof results [ prop ] == "object" && ! ( results [ prop ] instanceof Array ) ) { xml += serializeToXML ( results [ prop ] ) ; } } } } xml += "</" + results . type + ">" ; return xml ; } return "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + serializeToXML ( results ) ; }
Returns test results formatted as an XML string.
@param {Object} result The results object created by TestRunner.
@return {String} An XML-formatted string of results.
@method XML
@static
Returns test results formatted as an XML string .