XPath...
Well this isn't exactly "programming", more scripting, for those of you who are unsure what XPath is, it's used in JavaScript to get elements from XML files, which can then be used in a document, for example, you could get an XML file which contains books or something, and then display them in a page using XPath. This used to be pretty simple, but since Firefox 3 has come out, it's been made alot harder due to security measures being tightened. The node you have, needs to have the same "ownerDocument" as the node you got it from, which is impossible, as it will be from different documents… So, a function was introduced, "importNode()", this allows you, or is meant to allow you, to import nodes from external documents, and then clone them into the current document, however, this doesn't work well with XPath.
I am looking for anyone who has ever used XPath or has any knowledge about it to give me a hand fix my script that used to work for Firefox 2 and below, and also works for IE7 and below, to meet the Firefox 3 rules, as it is starting to give me a headache now.
My script is located here, I'd use a code box, but it messes up the formatting.
The error being thrown is:
markupError: uncaught exception: [Exception... "Node cannot be used in a document other than the one in which it was created" code: "4" nsresult: "0x80530004 (NS_ERROR_DOM_WRONG_DOCUMENT_ERR)" location: "http://www.elites0ft.com/elites0ft-xml.js Line: 40"]
Thank you to any of you who reply and are of any help, it is very much appreciated :) ~system.
[Edit]Nevermind, I fixed it :)[/edit]
Feralas wrote: what was the solution?
This: www.nabble.com/XPath-from-extension's-chrome-not-working-in-Firefox-3-td14718610.html
Edit: Ninja'd.