Skip to content

Instantly share code, notes, and snippets.

@troygilbert
Created January 20, 2011 22:16
Show Gist options
  • Save troygilbert/788799 to your computer and use it in GitHub Desktop.
Save troygilbert/788799 to your computer and use it in GitHub Desktop.
Weird bug with E4X syntax
var xml:XML = <root><child name="one"/></root>;
var name:String = "one";
var matches:XMLList = xml.child.(@name == name);
trace(matches.length()); // 0
var nameValue:String = name;
matches = xml.child.(@name == nameValue);
trace(matches.length()); // 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment