Re: Getting back XML DOM Data
You are a node too shallow and also missing the siblings within each childNode. I would suggest using the following for both simplicity, and efficiency.
Code:
xmlDocumentElement = xmlHttp.responseXML.documentElement;
pr_names = xmlDocumentElement.getElementsByTagName('name');
pr_details = xmlDocumentElement.getElementsByTagName('details');
for(i = 0; i < pr_names.length; i++){
document.getElementById("details_box").innerHTML = pr_names[i].firstChild.nodeValue + "<br />" + pr_details[i].firstChild.nodeValue + "<br />";
}
If the post was helpful...Rate it! Remember to use [code] or [php] tags.