XmlPullParser parser = getParser();
if (!(entry instanceof CellEntry)) {
throw new IllegalArgumentException("Expected CellEntry!");
}
CellEntry row = (CellEntry) entry;
String name = parser.getName();
// cells can only have row, col, inputValue, & numericValue attrs
if ("cell".equals(name)) {
int count = parser.getAttributeCount();
String attrName = null;
for (int i = 0; i < count; ++i) {
attrName = parser.getAttributeName(i);
if ("row".equals(attrName)) {
row.setRow(StringUtils.parseInt(parser
.getAttributeValue(i), 0));
} else if ("col".equals(attrName)) {
row.setCol(StringUtils.parseInt(parser
.getAttributeValue(i), 0));
} else if ("numericValue".equals(attrName)) {
row.setNumericValue(parser.getAttributeValue(i));
} else if ("inputValue".equals(attrName)) {
row.setInputValue(parser.getAttributeValue(i));
}
}
// also need the data stored in the child text node
row.setValue(XmlUtils.extractChildText(parser));
}