prependChild, insertChildAfter, insertChildBefore : Child : XML Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » XML » Child »

 

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);

    }
  }
}

        



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


Flash / Flex / ActionScript examples

 Navioo XML
» Child