private TreeComponent readCompAttr(NamedNodeMap attrList,boolean isRoot) {
		TreeComponent c;
		SchComponent comp;
		if(isRoot) {
			c = new TreeComponent("OS Scheduler",null);
			comp=c.getSchCom();
			comp.setMinPeriod(1);
			comp.setMaxPeriod(1);
		}
		else
		{
			String name = attrList.getNamedItem("name").getNodeValue();
			c = new TreeComponent(name, tree.getRoot());
			c.setTaskList(new TaskList());
			comp=c.getSchCom();
			
		}

//		if (attrList.getNamedItem("subtype") != null) {
//			if (attrList.getNamedItem("subtype").getNodeValue()
//					.equalsIgnoreCase("tasks")) {
//				comp.setTaskList(new TaskList());
//			} else {
//				//comp.setSubUnit(new RBTTree());
//			}
//		}
		String scheduler;
		if (attrList.getNamedItem("scheduler") != null) {
			scheduler = attrList.getNamedItem("scheduler").getNodeValue();
		} else if (attrList.getNamedItem("os_scheduler") != null) {
			scheduler = attrList.getNamedItem("os_scheduler").getNodeValue();
		} else {
			scheduler = "edf";
		}
		comp.setAlgorithm(scheduler);

		if (attrList.getNamedItem("min_period") != null && attrList.getNamedItem("max_period") != null) {
			double minperiod = new Double(attrList.getNamedItem("min_period")
					.getNodeValue());
			double maxperiod = new Double(attrList.getNamedItem("max_period")
					.getNodeValue());
			comp.setMinPeriod(minperiod);
			comp.setMaxPeriod(maxperiod);
		} 

		if (attrList.getNamedItem("period") != null) {
			double period = new Double(attrList.getNamedItem("period").getNodeValue());
			comp.setPeriod(period);
			comp.setMaxPeriod(period);
			comp.setMinPeriod(period);
		}

		if (attrList.getNamedItem("criticality") != null) {
			String criticality = attrList.getNamedItem("criticality")
					.getNodeValue();
			comp.setCriticality(criticality);
		}

		if (attrList.getNamedItem("vmips") != null) {
			String vmips = attrList.getNamedItem("vmips").getNodeValue();
			comp.setVmipsStr(vmips);
		}

		if (attrList.getNamedItem("subtype") != null) {
			String subtype = attrList.getNamedItem("subtype").getNodeValue();
			comp.setSubType(subtype);
		}
		return c;
	}