PDA

Click to See Complete Forum and Search --> : appendChild (DOM)



bowa
05-13-2001, 06:24 AM
i have an xmlObj looking like this

http://ultra.bowa.be/~waesb/spel.xml

now i want to append more (ZET) elements inside the (SPEL)(/SPEL) node how do i do
this ?

i am now using

function addxml(vak,kleur){
elm = xmlObj.createElement("ZET");
elm.attributes.kleur = kleur;
elm.attributes.vak = vak;
xmlObj.lastChild.appendChild(elm);
}

but this adds the elements at the end just before (/GAME)


anyone good with firstChild and nextSibling and so on ?

thanks in advance,
bruno