}
}
@Override
public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext uc) {
Tuples t = new Tuples();
//starts from root <tuples>
while (reader.hasMoreChildren()) {
reader.moveDown(); //goes down to <tuple>
HashMap<String, String> map = new HashMap<String, String>();
//reads properties on the same level
while (reader.hasMoreChildren()) {
reader.moveDown();
map.put(reader.getAttribute("name"),
reader.getAttribute("value"));
reader.moveUp();
}
t.add(map);
reader.moveUp(); //goes up to the next <tuple>
}
return t;
}