Jump to content

Never Hide Gaming

  • Posts

  • Joined

  • Last visited

Contact Methods

  • Website URL

Profile Information

  • Location

Never Hide Gaming's Achievements


Newbie (1/7)



  1. Hello and thank you to anyone and everyone that responds. I am very new to XML and have done some of the tutorials, but I am having trouble getting the information to pull. The XML file is automatically updated by a website and I would like to pull information off of it to put on my own website. First off, do I need to re-load the XML file on my site first? Someone said that I was going to have to do this but I am not sure how. I feel as though this could be the error that I am facing. http://gamebattles.majorleaguegaming.com/xboxone/call-of-duty-advanced-warfare/team/never-hide-gaming/stats.xml This is the code that I am trying to use. If I can get one thing to actually pull, then I can figure the rest out. I have been using the Tryit Editor so far to test everything before populating my site. <!DOCTYPE html><html><head><style>table, th, td { border: 1px solid black; border-collapse:collapse;}th, td { padding: 5px;}</style></head><body><script>if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); }else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); }xmlhttp.open("GET","gamebattles.majorleaguegaming.com/xboxone/call-of-duty-ghosts/team/never-hide/stats.xml",false);xmlhttp.send();xmlDoc=xmlhttp.responseXML; document.write("<table><tr><th>Team</th><th>Result</th></tr>");var x=xmlDoc.getElementsByTagName("recentMatches");for (i=0;i<x.length;i++) { document.write("<tr><td>"); document.write(x[i].getElementsByTagName("name")[0].childNodes[0].nodeValue); document.write("</td><td>"); document.write(x[i].getElementsByTagName("result")[0].childNodes[0].nodeValue); document.write("</td></tr>"); }document.write("</table>");</script></body></html> Sorry that this is so long and drawn out, but thank you very much in advance.
  • Create New...