Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

file 39 lines (38 sloc) 1.269 kb
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 33 34 35 36 37 38 39
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Test page for Query YQL</title>
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load("jquery", "1.3.2");
</script>
<script type="text/javascript" src="jquery.query-yql.js"></script>
<script type="text/javascript">
$(function () {
  var t = $("#content").empty();
  var statement = "select * from feed where url='http://feeds.feedburner.com/hail2u/blog'";
  $.queryYQL(statement, function (data) {
    var r = data.query.results;
    var ul = $("<ul/>");
    $.each(r.item, function () {
      $("<li/>").append(this.title).appendTo(ul);
    });
    ul.appendTo(t);
  });

  statement = "select * from html where url='http://b.hatena.ne.jp/h2u/' and xpath='//h3[@class=\"entry\"]/a[not(@class=\"domain\")]'";
  $.queryYQL(statement, "xml", function (data) {
    var ul = $("<ul/>");
    $.each(data.results, function () {
      $("<li/>").append($(this.toString()).text()).appendTo(ul);
    });
    ul.appendTo(t);
  });
});
</script>
</head>
<body>
<h1>Test page for Query YQL</h1>
<div id="content"></div>
</body>
</html>
Something went wrong with that request. Please try again.