I’m doing a very simple YQL statement:
select * from xml where url="http://www.wowhead.com/item=50278&xml"
The rest query looks like this (super long with crazy url escape codes):
http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20xml%20where%20url%3D%22http%3A%2F%2Fwww.wowhead.com%2Fitem%3D50278%26amp%3Bamp%3Bxml%22
So I’m trying to use the query alias to shorten it down. I know I can use something like url=@parameter but how would I do it so the item number is the variable and the rest query would look something like:
http://query.yahooapis.com/v1/public/yql/RVCA18/wowheadXML?item=50278
I appreciate the help 🙂
You can build the URL to the XML file using a URI Template (info, YQL uses the 03 draft). The YQL query to do that would look like the following.
(Try this in the YQL console)
The next stage, which it looks like you already know how to do, is to alias the above query to
wowheadXMLand call it with theitemvalue in the query string (example).