Jump to content

Consuming XML data from Wikipedia API with Javascript


mcashatt

Recommended Posts

Hello,

 

I am struggling with something that I thought would be simple:

 

I can pull xml data from wikipedia like so (using "Paris Hilton" as an example):

 

http://en.wikipedia.org/w/api.php?action=opensearch&search=paris%20hilton&format=xml&limit=1

 

However, I can't seem to consume this xml via standard AJAX functions (please see attached).

 

The attached HTML has javascript that should simply show an alert modal with the responseText.  This works when I use local xml files, but not for the wikipedia data.

 

Any help would be greatly appreciated.

 

Thanks!

 

Matt

 

[attachment deleted by admin]

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.