I would like to load and parse an WMT_MS_Capabilities using Javascript. I have unsuccessfully tried severaly ways. I am trying with this file but I always get this error:

uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIXMLHttpRequest.send]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: file:///home/frowing/Projects/XMLParsing/testXML.js :: <TOP_LEVEL> :: line 10" data: no]

I hope someone can throw some light on this because I have no idea where to go next.



I expect you'll need a proxy unless that is the site you are running your JavaScript from. See http://trac.osgeo.org/openlayers/wiki/FrequentlyAskedQuestions#ProxyHost for more details.

  • If I had debugged with Chrome instead of Firefox, I would have known right away from the error it gives you. Thanks a lot! – Fran Sevillano May 9 '11 at 6:17

The WMT_MS_Capabilities file seems ok. I have validated it twice using the on-line XML validation services http://www.validome.org/xml/ and http://www.xmlvalidation.com/, and in both cases no error was found.

Thus, the error must be somewhere in file:///home/frowing/Projects/XMLParsing/testXML.js.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.