Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gerhardlm/DynamicXMLParser
Dynamic parse xml content into predefined data classes (actionscript 3).
https://github.com/gerhardlm/DynamicXMLParser
Last synced: about 2 months ago
JSON representation
Dynamic parse xml content into predefined data classes (actionscript 3).
- Host: GitHub
- URL: https://github.com/gerhardlm/DynamicXMLParser
- Owner: gerhardlm
- Created: 2011-03-21T01:45:14.000Z (almost 14 years ago)
- Default Branch: master
- Last Pushed: 2011-03-21T01:46:36.000Z (almost 14 years ago)
- Last Synced: 2024-11-14T11:02:29.177Z (about 2 months ago)
- Language: ActionScript
- Homepage:
- Size: 97.7 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
- awesome-actionscript-sorted - DynamicXMLParser - Dynamic parse xml content into predefined data classes (actionscript 3). (File Formats / XML)
README
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.