+ struct ts_node *iter = root->child_list;
+ while(iter) {
+ struct ts_node *node = iter;
+ iter = iter->next;
+
+ if(strcmp(node->name, "item") == 0) {
+ SceneNode *snode;
+
+ const char *amatch = ts_get_attr_str(node, "match_node");
+ if(!amatch || !(snode = mscn->match_node(amatch))) {
+ error_log("ExhibitManager::load: regexp \"%s\" didn't match any nodes\n",
+ amatch ? amatch : "");
+ continue;
+ }
+
+ Exhibit *ex;
+ const char *atype = ts_get_attr_str(node, "type");
+ if(!atype || !(ex = create_exhibit(atype))) {
+ error_log("failed to create exhibit of type: %s\n", atype);
+ continue;
+ }
+
+ const char *desc = ts_get_attr_str(node, "description");
+ const char *voice = ts_get_attr_str(node, "voiceover");
+ if(desc || voice) {
+ ExData exd;
+
+ if(desc) {
+ exd.text = std::string(desc);
+ }
+ if(voice) {
+ exd.voice = new OggVorbisStream;
+ if(!exd.voice->open(voice)) {
+ error_log("failed to open voiceover: %s\n", voice);
+ delete exd.voice;
+ exd.voice = 0;
+ }
+ }
+ ex->data.push_back(exd);
+ }
+
+ ex->set_node(snode);
+ items.push_back(ex);
+ }
+ }
+