javascript - Access to a text node? -


i want access textnode (passengers here) can't. i'm using javascript , xmldoc. have null , undefined error

this xml file :

<functionalinstance>     <id value="100177" type="humaninstance">       <mandatory>         <externalid type="string">passenger.1</externalid>         <relation ownerreference="100171" reference="100172"/> 

this function :

function collectid() {     for(var = 0; < acteurs.length; i++) {      var actortag =xmldoc.getelementsbytagname("functionalinstance")[0].childnodes[i].getelementsbytagname["mandatory"].childnodes[0].nodevalue;      alert(actortag);     } } 

thank help


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -