资 源 简 介
This is a simple XML Reader
>
---
> To read an XML
```
// XML Reader instance
var xmlReader : XMLReader = new XMLReader();
// To add a XML file
xmlReader.addXML( "myfile.xml" );
// To load a XML file
xmlReader.load();
// To add event listeners
xmlReader.addEventListener( XMLReaderEvent.COMPLETE, complete );
function complete( e:XMLReaderEvent ):void {
// To trace XML
trace( e.target.xml );
}
```
> Or more simply
```
// XML Reader instance
var xmlReader : XMLReader = new XMLReader( "myfile.xml" );
// To load a XML file
xmlReader.load();
// To add event listeners
xmlReader.addEventListener( XMLReaderEvent.COMPLETE, complete );
function complete( e:XMLReaderEvent ):void {
// To trace XML
trace( e.target.xml );
}
```
> Or more simply again
```
// XML Reader instance - second parameter is boolean to define autoLoad
var xmlRea