I don't know why this has eluded me and I hope someone can help me out here. I have a for statement and I have found a match:
In this case I have 4 matches for "offerGroup". There is a childNode, childNode[1], of the offerGroup node that contains three attributes that I am extracting. Now that I have captured the node offerGroup how do I iterate through it so I can name the 3 vars that capture the 3 attributes of each offerGroup node. Once again, 4 nodes.Code:if (xmlObj.childNodes[1].childNodes[1].childNodes[3].childNodes[i].tagName == "offerGroup") { alert("length = "+xmlObj.childNodes[1].childNodes[1].childNodes[3].childNodes[i].tagName); //for (j = 1; j < xmlObj.childNodes[1].childNodes[1].childNodes[3].childNodes[i].length; j++) //{ var MainModule_offer[j]Text = xmlObj.childNodes[1].childNodes[1].childNodes[3].childNodes[i].childNodes[1].getAttribute("text"); var MainModule_offer[j]Blurb = xmlObj.childNodes[1].childNodes[1].childNodes[3].childNodes[i].childNodes[1].getAttribute("blurb"); var MainModule_offer[j]Link = xmlObj.childNodes[1].childNodes[1].childNodes[3].childNodes[i].childNodes[1].getAttribute("link"); //} }
Help!




Bookmarks