| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -94,7 +94,7 @@ void mousePressed() { | |||
| 94 | 94 | // Set the diameter element | |
| 95 | 95 | XML diameter = bubble.addChild("diameter"); | |
| 96 | 96 | // Here for a node's content, we have to convert to a String | |
| 97 | - diameter.setContent("" + random(40,80)); | ||
| 97 | + diameter.setFloatContent(random(40,80)); | ||
| 98 | 98 | ||
| 99 | 99 | // Set a label | |
| 100 | 100 | XML label = bubble.addChild("label"); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -29,7 +29,7 @@ void setup() { | |||
| 29 | 29 | XML xml = loadXML(url); | |
| 30 | 30 | ||
| 31 | 31 | // Grab the element we want | |
| 32 | - XML forecast = xml.getChild("channel").getChild("item").getChild("yweather:forecast"); | ||
| 32 | + XML forecast = xml.getChild("channel/item/yweather:forecast"); | ||
| 33 | 33 | ||
| 34 | 34 | // Get the attributes we want | |
| 35 | 35 | temperature = forecast.getInt("high"); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments