Use the dot operator (.) on the XML instance and add the element
package{
import flash.display.Sprite;
publicclass Main extends Sprite{
public function Main(){
var example:XML = <example />;
// Create a new XML node named newElement and add it to the example instance
example.newElement = <newElement />;
trace( example );
}
}
}