} else if (child.getNodeName().equalsIgnoreCase("animation")) {
} else if ("animation".equalsIgnoreCase(child.getNodeName())) {
    private Tile unmarshalTile(TileSet set, Node t, String baseDir)        throws Exception    {        Tile tile = null;        NodeList children = t.getChildNodes();        boolean isAnimated = false;        for (int i = 0; i < children.getLength(); i++) {            Node child = children.item(i);            if (child.getNodeName().equalsIgnoreCase("animation")) {                isAnimated = true;                break;            }        }        try {            if (isAnimated) {                tile = (Tile)unmarshalClass(AnimatedTile.class, t);            } else {                tile = (Tile)unmarshalClass(Tile.class, t);            }        } catch (Exception e) {        	logger.error("failed creating tile: "+e.getLocalizedMessage());            //e.printStackTrace();            return tile;        }        tile.setTileSet(set);        Properties tileProps = tile.getProperties();        for (int i = 0; i < children.getLength(); i++) {            Node child = children.item(i);            if (child.getNodeName().equalsIgnoreCase("image")) {                int id = getAttribute(child, "id", -1);                Image img = unmarshalImage(child, baseDir);                if (id < 0) {                    id = set.addImage(img);                }                tile.setImage(id);            } else if (child.getNodeName().equalsIgnoreCase("property")) {                tileProps.setProperty(                        getAttributeValue(child, "name"),                        getAttributeValue(child, "value"));            } else if (child.getNodeName().equalsIgnoreCase("animation")) {                // TODO: fill this in once XMLMapWriter is complete            }        }        return tile;    }