日期:2014-05-16 浏览次数:20483 次
static public function traceXMLByVO(voObj:Object,way:int=0):void { var desc:XMLList = describeType( voObj )["variable"]; var str:String = "<data>\n"; str += way?'<n>\n':'<n '; for each(var prop:XML in desc){ if(way) str += "<"+prop.@name+">"+voObj[prop.@name]+"</"+prop.@name+">\n"; else str += ""+prop.@name+"='"+voObj[prop.@name]+"' "; } str += way?'</n>':"/>"; str += "\n</data>" trace(str); // System.setClipboard(str); }