XML Problem
in
Programming Questions
•
2 years ago
hi,
im new in processing and i have a problem to get this code working
XMLElement XML;
XMLElement[] synset;
String matches;
void setup() {
matches = "http://www.openthesaurus.de/synonyme/search?q=Hand&format=text/xml";
XML = new XMLElement(this, matches);
synset = XML.getChildren("matches/synset/categories/term");
for (int i = 0; i < synset.length; i++) {
String term = synset[i].getStringAttribute("term");
println("synset"+ i + ";" + term);
}
}
it doesnt print out anything. does anyone know whats wrong with it ??
greetings
im new in processing and i have a problem to get this code working
XMLElement XML;
XMLElement[] synset;
String matches;
void setup() {
matches = "http://www.openthesaurus.de/synonyme/search?q=Hand&format=text/xml";
XML = new XMLElement(this, matches);
synset = XML.getChildren("matches/synset/categories/term");
for (int i = 0; i < synset.length; i++) {
String term = synset[i].getStringAttribute("term");
println("synset"+ i + ";" + term);
}
}
it doesnt print out anything. does anyone know whats wrong with it ??
greetings
1