Posted By

forchid on 11/19/09


Tagged

xml attribute as3


Versions (?)

Who likes this?

10 people have marked this snippet as a favorite

jasonm23
pauloc
quan
spastic
iamgowan
jslice390
TrentSkunk
ssolen
dubogii
gandreini


Check if XML attribute exists


 / Published in: ActionScript 3
 

  1. Usage 1:
  2.  
  3. var hasAttribute:Boolean = node.hasOwnProperty("@myAttribute");
  4.  
  5.  
  6. Usage 2:
  7.  
  8. var myList:XMLList = myXML.node.( hasOwnProperty( "@myAttribute" ) );
  9.  
  10.  
  11. Usage 3:
  12.  
  13. if ("@myAttribute" in node) { ... }

Report this snippet  

You need to login to post a comment.