Comment #36 on issue 988 by sc13.bioinf: Document.load is not supported
http://code.google.com/p/chromium/issues/detail?id=988
The work around posted by Gurreiro... in comment #9 (above) seems to cause
a bug in
FF3.5.5 Gecko/20091102
If I set file to a local xml file:
var file = "idedoc.xml";
When I paste the code in the firebug console I get:
"Access to restricted URI denied"
If I simply replace:
xmlDoc.load(file);
with:
xmlDoc.load("iedoc.xml");
In the try //Firefox, Mozilla, Opera, etc. block then there is no error.
Could be javascript try catch nastiness? (file is declared in a different
scope or
something?)
The irritating thing is that you won't see an error if you run this from a
js file on
a page. You also get back an xml document object. However this xml doc is
not valid
in some way as it doesn't work with the following code:
var nodes = my["iedoc"].evaluate("//function", my["iedoc"], null,
XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
var nodes = my["iedoc"].evaluate("//function", my["iedoc"], null,
XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
for(var i=0;i < nodes.snapshotLength;i++)
{
if(i === 4)
{
break;
}
var result = nodes.snapshotItem(i);
alert(i + " " + $(result).attr("name"));
}
nodes.snapshotLength == 0 with xmlDoc.load(file); but the loop runs fine
when using
xmlDoc.load("iedoc.xml");
The code above uses jquery and xpath.
http://jquery.com/
http://coderepos.org/share/wiki/JavaScript-XPath
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
--
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/group/chromium-bugs