public static GrainOrientedFarm createFarmFromXml(final String readFileLoc) {
        GrainOrientedFarm farm = null;
        try {
            DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
            DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
            Document doc = dBuilder.parse(readFileLoc);

            Node mainNode = doc.getDocumentElement();
            Element element = (Element) mainNode;
            NodeList nodeList;
            
            int startingMoney =
                    Integer.parseInt(getElementValueByTag((Element) mainNode, "money"));
            // System.out.println("Starting money: " + startingMoney);
            int kgOfGrain = Integer.parseInt(getElementValueByTag((Element) mainNode, "kgOfGrain"));
            
            farm = new GrainOrientedFarm(startingMoney);
            farm.setKgOfGrain(kgOfGrain);

            // * Reads fields from xml. ============================================================
            nodeList = element.getElementsByTagName("field");
            ArrayList<NormalFertilityField> fields = new ArrayList<NormalFertilityField>();

            for (int i = 0; i < nodeList.getLength(); i++) {
                mainNode = nodeList.item(i);

                if (mainNode.getNodeType() == Node.ELEMENT_NODE) {
                    Element innerElement = (Element) mainNode;

                    int width = Integer.parseInt(getElementValueByTag(innerElement, "width"));
                    int length = Integer.parseInt(getElementValueByTag(innerElement, "length"));
                    FieldStatuses fieldStatus =
                            Logic.convertStringToFieldEnum(getElementValueByTag(innerElement,
                                    "status"));

                    fields.add(new NormalFertilityField(width, length, fieldStatus));
                    // farm.buyNewField(0, width, length);
                }
            }
            farm.setFieldsOwned(fields);

            // * Reads equipment from xml.========================================================
            ArrayList<Equipment> equipment = new ArrayList<Equipment>();
            nodeList = element.getElementsByTagName("equipment");

            for (int i = 0; i < nodeList.getLength(); i++) {
                mainNode = nodeList.item(i);

                if (mainNode.getNodeType() == Node.ELEMENT_NODE) {
                    Element innerElement = (Element) mainNode;

                    // int price = Integer.parseInt(getElementValueByTag(innerElement, "price"));
                    String type = getElementValueByTag(innerElement, "type");
                    String model = getElementValueByTag(innerElement, "model");
                    
                    EquipmentTypes enumType = Logic.convertStringToEquipEnum(type);

                    if (enumType != null) {
                        equipment.add(new Equipment(enumType, model));
                    }
                }
            }
            farm.setEquipmentOwned(equipment);

        } catch (ParserConfigurationException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (SAXException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }

        return farm;
    }