src/file_handling/XMLParser.java
private SimulationType readSimulationType(Element root){
		String type = root.getAttribute(SIMULATION_ATTRIBUTE);
		if(mySimulationMap.containsKey(type)){
			return mySimulationMap.get(type);
		}else{
			throw new XMLException(myResources.getString("InvalidSimulation"));
		}
		
	}
/**
	 * Gets the attribute of the root element of the XML file and
	 * uses it to return the desired SimulationType.
	 * 
	 * @param root element of the XML file
	 * @return subclass of SimulationType identified by the XML file
	 */
Gets the attribute of the root element of the XML file and
uses it to return the desired SimulationType.

@param root element of the XML file
@return subclass of SimulationType identified by the XML file
Gets the attribute of the root element of the XML file and uses it to return the desired SimulationType . @param root element of the XML file @return subclass of SimulationType identified by the XML file
private SimulationType readSimulationType(Element root){
		String type = root.getAttribute(SIMULATION_ATTRIBUTE);
		if(mySimulationMap.containsKey(type)){
			return mySimulationMap.get(type);
		}else{
			throw new XMLException(myResources.getString("InvalidSimulation"));
		}
	}
private SimulationType readSimulationType ( Element root ) { String type = root . getAttribute ( SIMULATION_ATTRIBUTE ) ; if ( mySimulationMap . containsKey ( type ) ) { return mySimulationMap . get ( type ) ; } else { throw new XMLException ( myResources . getString ( "InvalidSimulation" ) ) ; } }
Gets the attribute of the root element of the XML file and
 uses it to return the desired SimulationType.
Gets the attribute of the root element of the XML file and uses it to return the desired SimulationType .