-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtext_file.xml
32 lines (30 loc) · 949 Bytes
/
text_file.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?xml version="1.0" encoding="UTF-8" ?>
<table xmlns="http://query.yahooapis.com/v1/schema/table.xsd">
<meta>
<author>Paul Daniel (hapdaniel)</author>
<description>Execute a REST query and return the result as a string
instead of the DOM.
</description>
<sampleQuery>select * from {table} where url="www.myfeed.com/stuff.txt"</sampleQuery>
</meta>
<bindings>
<select itemPath="" produces="XML">
<urls>
<url></url>
</urls>
<inputs>
<key id="url" type="xs:string" paramType="variable" required="true" />
<key id="charset" type="xs:string" paramType="variable" required="false" />
</inputs>
<execute><![CDATA[
if (!charset) {
charset = "UTF-8";
}
var text = y.rest(url)
.forceCharset(charset)
.get().response;
response.object = text;
]]></execute>
</select>
</bindings>
</table>