An element is equal to an XML attribute if the element contains no child and the text contained by the element matches the attribute value. : Equality : XML Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » XML » Equality »

 

An element is equal to an XML attribute if the element contains no child and the text contained by the element matches the attribute value.


 


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

        var product:XML = <PRODUCT QUANTITY="1"><COST>1</COST></PRODUCT>;
        trace(product.@QUANTITY == product.COST);  // Displays: true


    }
  }
}

        



Leave a Comment / Note


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


Flash / Flex / ActionScript examples

 Navioo XML
» Equality