I have a xml file and actionscript classes for same xml file.
eg: xml file
<element name="Student">
<element name="FirstName">
<value>Sachin</value>
</element>
</element>
as3 classes:
Student.as
package generated {
public class Student{
public var firstName:FirstName = new FirstName();
}
}
FirstName.as
package generated {
public class FirstName{
public var value:String;
}
}
Now, I want to convert above xml into actionscript object.
Is there any tool?
Please, help…… Thanks…:)
I believe your choices are:
Using service methods, Flex can handle XML as native objects; however, this would not map to classes you’ve typed. You might be able to follow patterns of Flex remoting services to correctly map to class definitions without duct typing.
Not quite what you’re after, but turning XML to an object has been asked here: Turn an XML string into an Object in Actionscript