Parse XML through httprequest directly in the DOM

adendexia

New Member
I'm making a Httprequest to get a XML file and it works well !My JS Function :\[code\]function sendData(){ var xdr = getXDomainRequest(); xdr.onload = function() { document.getElementById("myDiv").innerHTML = xdr.responseText; } xdr.open("GET", "myURL"); xdr.send();} \[/code\]I have now something like this appended in "#myDiv" :\[code\]<div id="myDiv"><!--?xml version="1.0" encoding="UTF-8"?--><liste><produits><produit><nomprod>TEXT</nomprod><desc>TEXT</desc><texte>TEXT</texte></produit></produits></liste></div>\[/code\]Now, I would like to PARSE this XML contained in "#myDiv" and styling itAny ideas? Thanks!
 
Back
Top