OpenLayers Script Protocol XML Example

# Script Protocol With XML

protocol, script, cross origin, xml, advanced

Demonstrates how, with a custom parseFeatures method, the script protocol can be used with YQL for cross-origin loading of files in any of the XML formats supported by OpenLayers.

YQL can wrap a jsonp callback around an XML file, which effectively means Yahoo's servers are acting as a proxy for cross-origin feature loading. This example uses a GPX file, but the same technique can be used for other formats such as KML.

View the cross-origin-xml.js source to see how this is done