XML in AS3
theres lots of functions add child nodes, right there none delete them. there approuch deleting 1 node?
i used function delete node passing database , index
number of node wanted delete. customized program, should looking answer
function killchild(database:xml, childpos:uint):xml{
var newdatabase:xml = new xml('<?xml version="1.0" standalone="yes"?><entrys></entrys>');
var count:uint = 0;
while(database.entry[count]) {
if(count != childpos){
newdatabase.appendchild(database.entry[count]);
}
count++;
}
return(newdatabase);
}
number of node wanted delete. customized program, should looking answer
function killchild(database:xml, childpos:uint):xml{
var newdatabase:xml = new xml('<?xml version="1.0" standalone="yes"?><entrys></entrys>');
var count:uint = 0;
while(database.entry[count]) {
if(count != childpos){
newdatabase.appendchild(database.entry[count]);
}
count++;
}
return(newdatabase);
}
More discussions in ActionScript 1 and 2
adobe
Comments
Post a Comment