How do I iterate through nodes in Javascript?

In your example you are using objNodeList.length to control the iteration of permit Details, but objNodeList is set using
objNodeList = dom.getElementsByTagName(“permit”);
so it contains only one (permit) Element.

If you use permitDetails.length to control your loop, you should iterate properly over all of the details.

I have attached a html/javascript example.
test.html (726 Bytes)