package{ import flash.display.Sprite; public class Main extends Sprite{ public function Main(){ var myXML:XML = <foo a="1" b="2" c="3" />; trace(myXML.@*.toXMLString()); } } }