public function analyze(_obj):void {
var item:Object;
switch (typeof(_obj)){
case "object":
write("<object>");
write(_obj.toString());
for each (item in _obj){
analyze(item);
};
write("</object>");
break;
case "xml":
write("<xml>");
write(_obj);
write("</xml>");
break;
default:
write(_obj + " (" + typeof(_obj) + ")");
break;
};
} // analyze()
public function write(_obj):void{
trace(_obj);
} // END write()