boolean parseMessage(Message request) {
		clientIdToServer = new String(request.contents.getAttributes().getNamedItem("id").getNodeValue());

		Node child = request.contents.getFirstChild();
		
		if (child.getAttributes().getNamedItem("type").getNodeValue().equals("open"))
			myType = EventType.OPEN;
		else if (child.getAttributes().getNamedItem("type").getNodeValue().equals("closed"))
			myType = EventType.CLOSED;
		else
			myType = EventType.ERROR;
			
		if (child.getAttributes().getNamedItem("behavior").getNodeValue().equals("roundRobin"))
			myBehavior = Behavior.ROUNDROBIN;
		else if (child.getAttributes().getNamedItem("behavior").getNodeValue().equals("asynchronous"))
			myBehavior = Behavior.ASYNCHRONOUS;
		else myBehavior = Behavior.ERROR;
			
		myQuestion = new String(child.getAttributes().getNamedItem("question").getNodeValue());
		numOfChoices = Integer.parseInt(child.getAttributes().getNamedItem("numChoices").getNodeValue());
		numOfRounds = Integer.parseInt(child.getAttributes().getNamedItem("numRounds").getNodeValue());
		
		//one layer deep are the nodes that hold information for the Choices and the Moderator.
		//unfortunately children nodes are accessed through a separate entity called a 'NodeList'
		NodeList myList = child.getChildNodes();

		// Parse through each child.  Each of these children also have attributes
		for (int i = 0; i < myList.getLength(); i++) { 
			if (myList.item(i).getNodeName().equals("choice")) {  //A Choice has been found
				String choiceName = new String("");
				int indexOf = -1;
				
				choiceName = myList.item(i).getAttributes().getNamedItem("value").getNodeValue();
				indexOf = Integer.parseInt(myList.item(i).getAttributes().getNamedItem("index").getNodeValue());
				
				Choice newChoice = new Choice(choiceName, indexOf, -1);
				myChoices.add(newChoice);
			}
			else if (myList.item(i).getNodeName().equals("user")) {  //A Moderator has been found
				moderator = myList.item(i).getAttributes().getNamedItem("name").getNodeValue();
				
				if (myList.item(i).getAttributes().getNamedItem("password") != null)
					moderatorPassword = myList.item(i).getAttributes().getNamedItem("password").getNodeValue();
				else
					moderatorPassword = new String("");
			}
		}
		
		//Theoretically, the message has been fully parsed at this point
		return true;
	}