I want to access the textContent property of an XML object in JavaScript. The root item has several children which also have some children themselves. To get the children on
Using the following obtains the desired value of the child1 nodes for me..
var k = xmlDoc.getElementsByTagName("child1"); for(var i = 0; i < k.length; i++) { console.log(k[i].childNodes[0].nodeValue); }