FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

two quick XML example fixes · whyi/processing@c31ecf4 · GitHub

Repository navigation

Commit c31ecf4

Browse files
committed
two quick XML example fixes
1 parent 1b96b27 commit c31ecf4

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎java/examples/Topics/Advanced Data/LoadSaveXML/LoadSaveXML.pde‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ void mousePressed() {
9494
// Set the diameter element
9595
XML diameter = bubble.addChild("diameter");
9696
// 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));
9898

9999
// Set a label
100100
XML label = bubble.addChild("label");

‎java/examples/Topics/Advanced Data/XMLYahooWeather/XMLYahooWeather.pde‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ void setup() {
2929
XML xml = loadXML(url);
3030

3131
// 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");
3333

3434
// Get the attributes we want
3535
temperature = forecast.getInt("high");

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL