parsing xml in flash

import ginner.GDispatcher
class flashdb.utils.ParserXML extends XML {
var target:MovieClip
var xmlobj:XML
var lista:Array
var ref:Object

public var addEventListener:Function;
public var removeEventListener:Function;
private var dispatchEvent:Function;

function ParserXML (targ:MovieClip, list:Array,
URI:String) {

if (!arguments) {
target = targ
lista = list

xmlobj = new XML();
xmlobj[“ref”] = this;
trace (this);
xmlobj.ignoreWhite = true;
xmlobj.onLoad = onLoad;
function onLoad (success) {
if (success) {

var nodeXML:XML = this;
if (nodeXML.firstChild.childNodes.length!=null) {
//trace (nodeXML.childNodes[0]);
//trace (nodeXML.childNodes[1]);
//var Childvalue = “childNodes[1]”;

for (var i:Number = 0; i<nodeXML.firstChild.childNodes.length;i++){

var obj:Object = new Object()
for (var j in nodeXML.childNodes[1].childNodes[i].attributes) {
obj[j] = String(nodeXML.childNodes[1].childNodes[i].attributes[j]);

this.ref.dispatchEvent({, type:’onloadFinished’});
this.ref.dispatchEvent({, type:’onloadError’});




2 thoughts on “parsing xml in flash

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s