if (!XML_NODE_NAME.equals(node.getName()))
throw new XmlException("Cannot read node");
String[] dataPieces;
String seenData, ownedData;
XmlNode seen = node.getChildren("seen").get(0);
XmlNode owned = node.getChildren("owned").get(0);
seenData = seen.getValue().replace('[', ' ').replace(']', ' ').trim();
if (!seenData.isEmpty()) {
dataPieces = seenData.split(",");
for (String item : dataPieces) {
_data.put(Integer.parseInt(item.trim()), PokedexStatus.SAW);
}
}
ownedData = owned.getValue().replace('[', ' ').replace(']', ' ').trim();
if (!ownedData.isEmpty()) {
dataPieces = ownedData.split(",");
for (String item : dataPieces) {
_data.put(Integer.parseInt(item.trim()), PokedexStatus.OWN);
}