public AbstractEntity getEntity(String name) {
		if (!entityCache.containsKey(name)) {
			//create it from a string
			boolean isSolid = true;
			int buyValue = -1;
			int sellValue = -1;
			
	        Element root = document.getRootElement();
	        for (Iterator i = root.elementIterator(); i.hasNext(); ) {
	            Element element = (Element) i.next();
	            if (name.equals(element.attributeValue("name"))) {
	            	for (Iterator j = element.attributeIterator(); j.hasNext();) {
	    	            Attribute attribute = (Attribute) j.next();
	            		if ("solid".equals(attribute.getName())) {
	    	            	if ("false".equals(attribute.getStringValue())) {
	    	            		isSolid = false;
	    	            	}
	            		} else if ("buyValue".equals(attribute.getName())) {
	            			buyValue = Integer.parseInt(attribute.getStringValue());
	            		} else if ("sellValue".equals(attribute.getName())) {
	    	            	sellValue = Integer.parseInt(attribute.getStringValue());
	            		}
	            	}
	            }
	        }
			AbstractEntity entitiy = new EntityInstance(name, isSolid, buyValue, sellValue);
			
			entityCache.put(name, entitiy);
		}
		
		return entityCache.get(name);
	}