prependChild, insertChildAfter, insertChildBefore
package{
import flash.display.Sprite;
public class Main extends Sprite{
public function Main(){
var example:XML = <example>
<b />
<d />
<f />
</example>;
example.appendChild(<g />);
trace(example);
example.prependChild(<a />);
trace(example);
example.insertChildAfter(example.b, <c />);
trace(example);
example.insertChildBefore(example.f, <e />);
trace(example);
}
}
}
Related examples in the same category