Skip to content

Instantly share code, notes, and snippets.

@jbuda
Created March 19, 2013 12:32
Show Gist options
  • Save jbuda/5195715 to your computer and use it in GitHub Desktop.
Save jbuda/5195715 to your computer and use it in GitHub Desktop.
Converts XML Attributes to Object
package xml.utils {
public class XMLUtils {
public static function attributesToObject($xml:XMLList):Object {
var atts = new Object();
for (var i:int=0; i<$xml.length(); i++) {
atts[$xml[i].name().toString()] = $xml[i];
}
return atts;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment