Skip to content

Dynamic parse xml content into predefined data classes (actionscript 3).

Notifications You must be signed in to change notification settings

gerhardlm/DynamicXMLParser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

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.

About

Dynamic parse xml content into predefined data classes (actionscript 3).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published