Hey guys,
I'm looking to improve my script by having the XML online.
I've tryed to write a function, but I can't get it to work and I'm not sure why.
jscript code:
function readwebnode(game, node)
{
xml.load("http://www.arkanes-arkade.co.uk/x360/x360-db.xml");
xml.onreadystatechange=function()
{
if (xml.readyState == 4)
{
var value = xml.selectSingleNode("gameslist/game[@name='"+game+"']/"+node).text;
Debug.Trace(value);
}
}
}
I'm calling this at startup just to test, and using readwebnode("Crackdown", "psm"); to call it. this is one of the first things in the xml, and also since it's only 1 word I figured it would be easier.
When it runs though, I get "Error: Object required (code: -2146827864)" appear twice in the debug window, referring to line 118 (the line beginning var value).
I've tried using almost identical code, without the readystate etc on a local copy of the same file, and it returns properly, so I'm guessing that my problem is to do with the dl, but I don't know enough to see my problem. can anyone help me out?
Cheers guys