I found this code on w3schools.com. This insert xml infos to html.
[CODE]<script type=”text/javascript”>
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”,”http://www.w3schools.com/XML/cd_catalog.xml”,false);
xmlhttp.send();
xmlDoc=xmlhttp.responseXML;
document.write(“<table border=’1′>”);
var x=xmlDoc.getElementsByTagName(“CD”);
for (i=0;i<x.length;i++)
{
document.write(“<tr><td>”);
document.write(x[i].getElementsByTagName(“ARTIST”)[0].childNodes[0].nodeValue);
document.write(“</td><td>”);
document.write(x[i].getElementsByTagName(“TITLE”)[0].childNodes[0].nodeValue);
document.write(“</td></tr>”);
}
document.write(“</table>”);
</script>
My problem is that my xml is different. You can see my xml down and help me how to insert it in my page. I want only to display artist title and hour
[CODE]<Schedule System=”Jazler”>
<Event status=”happening” startTime=”10:54:56″ eventType=”song”>
<Announcement Display=”Now On Air:”/>
<Song title=”KRYPsE ME”>
<Artist name=”XATZHGIANNHS”>
<Media runTime=”183.837″/>
<Expire Time=”10:57:59″/>
</Artist>
</Song>
</Event>
</Schedule>