Calling Yahoo Weather API from VoiceXML
<p>I'm trying to make a voice weather system with voiceXML and the Yahoo Weather API. To develop my program I'm using voxeo evolution. </p>

<p>To call the Weather API I'm using the <code>data</code> vxml tag with an <code>srcexpr</code> because I need a dynamic URL (the program asks the user for a city to check weather in).</p>

<p>Here is my code:</p>

<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;vxml version = "2.1"&gt;
    &lt;form id="mainMenu"&gt;
        &lt;field name="City"&gt;
            &lt;prompt&gt; 
                Please, name a spanish city.
            &lt;/prompt&gt;

            &lt;grammar src="city.grammar"/&gt;
        &lt;/field&gt;
        &lt;!-- code taken from the javascript example of the yahoo weather api --&gt;
        &lt;script&gt;
        &lt;![CDATA[
            var callbackFunction = function(data) {
                var wind = data.query.results.channel.wind;
                alert(wind.chill);
            };
        ]]&gt;
        &lt;/script&gt;

        &lt;data srcexpr="https://query.yahooapis.com/v1/public/yql?q=select * from weather.forecast where woeid in (select woeid from geo.places where text='"+City+", spain')&amp;callback=callbackFunction"/&gt;
    &lt;/form&gt;
&lt;/vxml&gt;
</code></pre>

<p>The program doesn't work because of the <code>data</code> tag to connect to the weather API, but I don't know why. Do someone know why is failing?</p>