I'm a little new to flex builder. I have a xml file successfully imported in my program.
But I want it to be possible to add items to it. I figured it had to be with insertChildAfter
. This is what I got, but it won't work and can't find the solution.
example XML-structure:
<deelnemers>
<deelnemer>
<totem>timka</totem>
<aantalActiviteiten>2</aantalActiviteiten>
<actID>0</actID>
<actID>1</actID>
</deelnemer>
<deelnemer>
<totem>hop</totem>
<aantalActiviteiten>3</aantalActiviteiten>
<actID>0</actID>
<actID>1</actID>
<actID>3</actID>
</deelnemer>
</deelnemers>
function:
protected function button1_clickHandler(event:MouseEvent):void{
totem = myTotem.text; //Get information out of inputField
deelnemers.insertChildAfter(<totem>{totem}</totem>,
<actID>{ID}</actID>);
listDeelnemers.refresh();}