Posted By

justincrounds on 08/11/10


Tagged

actionscript


Versions (?)

XML.children() bug?


 / Published in: ActionScript 3
 

  1. var xml1:XML =
  2. <foo>
  3. <bar>foobar</bar>
  4. </foo>;
  5. var xml2:XML =
  6. <foo>
  7. <bar>foobar</bar>
  8. <bar>barfoo</bar>
  9. </foo>;
  10. trace(xml1.children());
  11. /* returns
  12. foobar
  13. */
  14. trace(xml2.children());
  15. /* returns
  16. <bar>foobar</bar>
  17. <bar>barfoo</bar>
  18. */

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: forapathy on August 12, 2010

no it is not a bug.. its the normal behavior.. if it finds a single value it's a XML value.. if finds more than one you get a XMLList..

You need to login to post a comment.