XML Element Not defined?
in
Processing with Other Languages
•
11 months ago
Im running into the issue that the browser's console is spitting the error a is undefined.
heres the snippet of code that this is occuring in.
XMLElement xml = new XMLElement(this, rest);
// parse XML results
XMLElement a = xml.getChild(0).getChild(0);
String fm = a.getStringAttribute("farm");
String sv = a.getStringAttribute("server");
String id = a.getStringAttribute("id");
String sc = a.getStringAttribute("secret");
// build http string
String url = "http://farm"+fm+".static.flickr.com/"+ sv + "/" + id + "_" + sc + "_z.jpg";
return url;
};
the code runs in processing just fine...
heres the snippet of code that this is occuring in.
XMLElement xml = new XMLElement(this, rest);
// parse XML results
XMLElement a = xml.getChild(0).getChild(0);
String fm = a.getStringAttribute("farm");
String sv = a.getStringAttribute("server");
String id = a.getStringAttribute("id");
String sc = a.getStringAttribute("secret");
// build http string
String url = "http://farm"+fm+".static.flickr.com/"+ sv + "/" + id + "_" + sc + "_z.jpg";
return url;
};
the code runs in processing just fine...
2