could some one give me an idea why my xml only gets parsed by IE and not FF?
much thanks for any clues (-:
function parseArticlesList()
{
try //Internet Explorer
{
xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
}
catch(e)
{
try //Firefox, Mozilla, Opera, etc.
{
xmlDoc=document.implementation.createDocument("","",null);
}
catch(e)
{
alert(e.message);
return;
}
}
xmlDoc.async = false;
xmlDoc.load("scripts/articles.xml");
var articles = new Array();
var i = 0;
var i2 = 0;
var artParent = xmlDoc.getElementsByTagName("posts")[0];
alert(artParent.childNodes[3].childNodes[0].nodeValue);
for(i;i<10;i++)
{
articles.push(artParent.childNodes*);
}
for(i2;i2<articles.length;i2++)
{
document.write(articles[i2].childNodes[0].nodeValue+"<br/>");
}
}
edit
if you want to see it in action go to, and notice the left column