The content of an element can be changed using the XML class's instance method replace( ). : Update : XML Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » XML » Update »

 

The content of an element can be changed using the XML class's instance method replace( ).


 

package{
  import flash.display.Sprite;
  
  public class Main extends Sprite{
    public function Main(){

        var doc:XML = <DOC>
            <P ALIGN="CENTER">E4X is fun</P>
          </DOC>;
        
        doc.replace("P", <DIV>E4X is convenient</DIV>);
        
        trace(doc);

    }
  }
}

        



Leave a Comment / Note


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


Flash / Flex / ActionScript examples

 Navioo XML
» Update