else if (sibs.getNodeName().equals("property")) {
else if ("property".equals(sibs.getNodeName())) {
    private void buildMap(Document doc) throws Exception {        Node item, mapNode;        mapNode = doc.getDocumentElement();        if (!mapNode.getNodeName().equals("map")) {            throw new Exception("Not a valid tmx map file.");        }        // Get the map dimensions and create the map        int mapWidth = getAttribute(mapNode, "width", 0);        int mapHeight = getAttribute(mapNode, "height", 0);        if (mapWidth > 0 && mapHeight > 0) {            map = new Map(mapWidth, mapHeight);        } else {            // Maybe this map is still using the dimensions element            NodeList l = doc.getElementsByTagName("dimensions");            for (int i = 0; (item = l.item(i)) != null; i++) {                if (item.getParentNode() == mapNode) {                    mapWidth = getAttribute(item, "width", 0);                    mapHeight = getAttribute(item, "height", 0);                    if (mapWidth > 0 && mapHeight > 0) {                        map = new Map(mapWidth, mapHeight);                    }                }            }        }        if (map == null) {            throw new Exception("Couldn't locate map dimensions.");        }        // Load other map attributes        String orientation = getAttributeValue(mapNode, "orientation");        int tileWidth = getAttribute(mapNode, "tilewidth", 0);        int tileHeight = getAttribute(mapNode, "tileheight", 0);        if (tileWidth > 0) {            map.setTileWidth(tileWidth);        }        if (tileHeight > 0) {            map.setTileHeight(tileHeight);        }        if (orientation != null) {            setOrientation(orientation);        } else {            setOrientation("orthogonal");        }        Properties mapProps = map.getProperties();        // Load the tilesets, properties, layers and objectgroups        for (Node sibs = mapNode.getFirstChild(); sibs != null;                sibs = sibs.getNextSibling())        {            if (sibs.getNodeName().equals("tileset")) {                map.addTileset(unmarshalTileset(sibs));            }            else if (sibs.getNodeName().equals("property")) {                mapProps.setProperty(getAttributeValue(sibs, "name"),                        getAttributeValue(sibs, "value"));            }            else if (sibs.getNodeName().equals("layer")) {                MapLayer layer = readLayer(sibs);                if (layer != null) {                    map.addLayer(layer);                }            }            else if (sibs.getNodeName().equals("objectgroup")) {                MapLayer layer = unmarshalObjectGroup(sibs);                if (layer != null) {                    map.addLayer(layer);                }            }        }    }