public void readFromXML(String elementName, XMLStreamReader parser) throws XMLStreamException {

		// check, if data belongs to this element 
		if (!elementName.equals(this.elementName)) {
//System.out.println (elementName + " != " + this.elementName);
			return;
		}
		
		// set function accordingly
		String function = parser.getAttributeValue ( null, "FunctionType");

		if (elementName.contains ("backlight")) {
			for (int i = 0; i < HardwareFunctionType.backLightFunctionTypes.length; i++) {
				if (HardwareFunctionType.backLightFunctionTypes[i].equals(function)) {
					functionSelectionBox.setSelectedIndex(i);
					((HardwareFunctionType) functionSelectionBox.getSelectedItem()).readFromXML (parser, function);
				}
			}
		}
		else if (elementName.contains ("PE1")) {
			for (int i = 0; i < HardwareFunctionType.PE1functionTypes.length; i++) {
				if (HardwareFunctionType.PE1functionTypes[i].equals(function)) {
					functionSelectionBox.setSelectedIndex(i);
					((HardwareFunctionType) functionSelectionBox.getSelectedItem()).readFromXML (parser, function);
				}
			}
		}
		else {
			for (int i = 0; i < HardwareFunctionType.functionTypes.length; i++) {
				if (HardwareFunctionType.functionTypes[i].equals(function)) {
					functionSelectionBox.setSelectedIndex(i);
					((HardwareFunctionType) functionSelectionBox.getSelectedItem()).readFromXML (parser, function);
				}
			}		
		}
		// update parameter list
		parameterLabel.setText (((HardwareFunctionType) functionSelectionBox.getSelectedItem()).getFunctionParameters() );
	}