var myXML:XML = <order> <item id='1'> <menuName>burger</menuName> <price>3.95</price> </item> <item id='2'> <menuName>fries</menuName> <price>1.45</price> </item> </order>; var newItem:XML = <item id="3"> <menuName>medium cola</menuName> <price>1.25</price> </item>; myXML.appendChild(newItem); trace(myXML); //<order> <item id="1"> <menuName>burger</menuName> <price>3.95</price> </item> <item id="2"> <menuName>fries</menuName> <price>1.45</price> </item> <item id="3"> <menuName>medium cola</menuName> <price>1.25</price> </item> </order>