Created
March 19, 2013 12:32
-
-
Save jbuda/5195715 to your computer and use it in GitHub Desktop.
Converts XML Attributes to Object
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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