private TileLayer extractData(Node datanode, TileDataEncoding encoding,
			TileDataCompression compression, int width, int height, String name, Properties properties, boolean visible, float opacity) 
					throws XPathExpressionException, JTMXParseException {
		int[] data = new int[width * height];
		if (encoding.equals(TileDataEncoding.XML)
				&& compression.equals(TileDataCompression.NONE)) {
			NodeList tilenodes = (NodeList) xpath.evaluate(
					"./tile", datanode, XPathConstants.NODESET);
			if (data.length != tilenodes.getLength())
				throw new JTMXParseException("Tile count does not match Map Dimensions!");
			for (int i = 0; i < tilenodes.getLength(); i++) {
				Node tilenode = tilenodes.item(i);
				long gid = prop2ulong(extractAttributes(tilenode), "gid");
				data[i] = (int) gid;
			}
		} else {
			throw new JTMXParseException(
					"Compressed/Encoded Tile Data is not yet supported", 
					new NotImplementedException());
		}
		return new TileLayer(width, height, name, properties, visible, 
				opacity, data);
	}