[seed] Weather: Now works, prints temperature in Colchester. More soon.
- From: Tim Horton <hortont src gnome org>
- To: svn-commits-list gnome org
- Subject: [seed] Weather: Now works, prints temperature in Colchester. More soon.
- Date: Wed, 13 May 2009 21:46:11 -0400 (EDT)
commit 731c01e9645e1174adce147317f2d65f92356fd2
Author: Tim Horton <hortont svn gnome org>
Date: Wed May 13 21:29:41 2009 -0400
Weather: Now works, prints temperature in Colchester. More soon.
---
examples/libxml-weather.js | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/examples/libxml-weather.js b/examples/libxml-weather.js
index b01eb75..c2bb2b4 100644
--- a/examples/libxml-weather.js
+++ b/examples/libxml-weather.js
@@ -17,6 +17,6 @@ var data = request.response_body.data;
var doc = libxml.parseString(data);
var ctx = doc.xpathNewContext()
-Seed.print(data);
-Seed.print(ctx.xpathEval("//condition").value[0].content);
+ctx.xpathRegisterNs("yweather", "http://xml.weather.yahoo.com/ns/rss/1.0");
+Seed.print(ctx.xpathEval("//yweather:condition/@temp").value[0].content);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]