Solutions-Nitriques/oembed_field — Issue #15: Abstract `getXmlDataFromSource` function
Author: brendo
Created: 2011-11-11 10:14:38+00:00
State: open

I'm trying to implement an Instagram driver, but the current way the drivers are setup prevents me from doing so as it assumes the result is XML. In Instagram's case, they only provide JSON.

Perhaps drivers could implement a `processURLSource` function, which the `getXmlDataFromSource` looks to see if implemented, and if so, offloads the fetching of the data to that function. If the function isn't implemented, the current code path of loading the XML into the `DOMDocument` would continue. This would allow me to load the JSON and convert it to XML.

I'm assuming the [Instagram oEmbed](http://instagram.com/developer/embedding/) return is consistent with the other providers.