Skip to content

Instantly share code, notes, and snippets.

@hivaga
Forked from nsdevaraj/xmltoObj.as
Created April 13, 2011 07:52
Show Gist options
  • Save hivaga/917156 to your computer and use it in GitHub Desktop.
Save hivaga/917156 to your computer and use it in GitHub Desktop.
Converting XML to Object
// converting XML to Object
private function xmlToObject( xml:XML ):Object {
var xmlStr:String = xml.toString();
var xmlDoc:XMLDocument = new XMLDocument( xmlStr );
var decoder:SimpleXMLDecoder = new SimpleXMLDecoder( true );
var obj:Object = decoder.decodeXML( xmlDoc );
return obj;
}
@hivaga
Copy link
Author

hivaga commented Apr 13, 2011

Converting XML ot Object using XMLDocument and SimpleXMLDecoder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment