-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
29 lines (21 loc) · 859 Bytes
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Usage
-----
You can use the static methods on DynamicXMLParser to dynamic parse a list or a node on xml.
private function loadXML():void
{
var _loader:URLLoader = new URLLoader(new URLRequest("_xml/quiz.xml"));
_loader.addEventListener(Event.COMPLETE, handleLoadComplete);
}
private function handleLoadComplete(e:Event):void
{
var quizXML:XML = XML(URLLoader(e.target).data);
var quizData:QuizData = QuizData(DynamicXMLParser.parseNode(quizXML, QuizData));
}
How-to
-----------
Build your data classes where public variables or setters will have the same names of xml's tags.
Restrictions
-----------
* For parse a list you should have a Vector instance or a class with a required parameter with Vector type.
* The only required parameters you can have is Vectors.
* All the class variables must be public or have setters.