List<Product> varlist = new ArrayList<Product>();
Element v = elem.getChild("Variables", ns);
List<Element> varInfo = v.getChildren();
for (Element p : varInfo) {
Product s;
String id = p.getAttributeValue("name");
if (id.contains("/")) {
String c[] = id.split("/");
s = new Product(c[0], c[1]);
varlist.add(s);
} else {
String name = p.getAttributeValue("vocabulary_name");
s = new Product(id, name);
varlist.add(s);
}
}
return varlist;
}