public Deck deckReader(String xmlFile) throws ParserConfigurationException, SAXException, IOException {

        Deck deck = new Deck();
        File deckXML = new File(xmlFile);
        DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
        DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
        Document doc = dBuilder.parse(deckXML);

        //optional, but recommended
        doc.getDocumentElement().normalize();

        NodeList nList = doc.getElementsByTagName("card");
        
        for (int temp = 0; temp < nList.getLength(); temp++) {
        	String name = "";
        	try {

	            Node nNode = nList.item(temp);
	
	            if (nNode.getNodeType() == Node.ELEMENT_NODE) {
	
	                // Create a card
	                Card card = new Card();
	                
	                // Number of cards to create
	                int countNum = 0;
	
	                Element eElement = (Element) nNode;
	
	                // Get all of the xml values
	                name = getTextContent(eElement, "name");
	                String faction = optTextContent(eElement, "faction","").toUpperCase();
	                String type = getTextContent(eElement, "type").toUpperCase();
	                String banishable = optTextContent(eElement, "banishable", "true");
	                String count = optTextContent(eElement, "count", "1");
	                String rune = optTextContent(eElement, "rune", "0");
	                String battle = optTextContent(eElement, "battle","0");
	                String honor = optTextContent(eElement, "honor","0");
	                String runeCost = optTextContent(eElement, "runeCost","0");
	                String battleCost = optTextContent(eElement, "battleCost","0");
	                String honorWorth = optTextContent(eElement, "honorWorth","0");
	 
	                    // Set all of the xml values to the card
	                card.setName(name);
	                if (!faction.isEmpty())card.setFaction(Faction.valueOf(faction));
	                card.setBanishable(Boolean.valueOf(banishable));
	                card.setType(Type.valueOf(type));
	                card.setRune(Integer.parseInt(rune));
	                card.setBattle(Integer.parseInt(battle));
	                card.setHonor(Integer.parseInt(honor));
	                card.setRuneCost(Integer.parseInt(runeCost));
	                card.setBattleCost(Integer.parseInt(battleCost));
	                card.setHonorWorth(Integer.parseInt(honorWorth));
	
	                // Add all of the abilities to an arraylist from the xml
	                
	                List<Ability> abilities = new ArrayList<Ability>();
	                NodeList eAbilities = eElement.getElementsByTagName("ability");
					for (int i = 0; i < eAbilities.getLength(); i++) {
						Node eAbility = eAbilities.item(i);
						
	                    try {
	                    	Ability ability = createAbility(eAbility);
	                        abilities.add(ability);
	                    } catch (Exception ex) {
	                        System.out.println("Exception with " + name + " ability: " + ex);
	                    }
	                }
	                card.setAbilities(abilities);
	                
	                // Get the number of cards to add to the deck
	                countNum = Integer.parseInt(count);
	                // Add the cards to the deck
	                for (int i = 0; i < countNum; i++) {
	                    deck.add(card);
	                }
	
	            }
        	} catch (Exception ex) {
        		System.out.println("Exception with creating " + name + ": " + ex);
        	}
        }
        return deck;
    }