@Override
	public void deleteReadyFood(ReadyFood rf) throws FoodDaoException {
		Element rfsElement = (Element) rfDoc.getElementsByTagName("ReadyFoods")
				.item(0);
		NodeList rfNodeList = rfsElement.getElementsByTagName("ReadyFood");
		boolean deleted = false;
		if (rfNodeList.getLength() > 0) {
			for (int i = 0; i < rfNodeList.getLength(); i++) {
				Element rfElem = (Element) rfNodeList.item(i);
				if (rfElem.getAttribute("id").equals(rf.getId())) {
					Node prev = rfElem.getPreviousSibling();
					if (prev != null && 
						     prev.getNodeType() == Node.TEXT_NODE &&
						     prev.getNodeValue().trim().length() == 0) {
						     rfsElement.removeChild(prev);
						 }
					deleted = true;
					rfsElement.removeChild(rfElem);
				}
			}
		}
		if(deleted){
			writeRFXml();
		}

	}