I'm outputting some XML as HTML and it's working nicely. However, it's not always pulling through. Every few attempts displays the XML as HTML, but there are times when it just white screens. It seems like there is some logic which is timing it out every now and again.
Has anybody got any suggestions on what this might be?
If I look at the error log when it screens its says:
Failed to load resource Uncaught NetworkError: A network error occurred.
Here is my code:
<!DOCTYPE html>
<html>
<head>
<script src="file:///Applications/MAMP/htdocs/XML%20test/java.js"></script>
</head>
<body>
<script>
xmlDoc=loadXMLDoc("http://ift.tt/1DNcY7f");
x=xmlDoc.getElementsByTagName("title");
for (i=0;i<x.length;i++)
{
document.write(x[i].childNodes[0].nodeValue);
document.write("<br><hr /><br>");
}
</script>
</body>
</html>
No comments:
Post a Comment