public static FilterConfig XML2java(Element root) {

		FilterConfig filterConfig = new FilterConfig();
		Iterator rootIter = root.elementIterator();
		while (rootIter.hasNext()) {
			Element element = (Element) rootIter.next();
			if (element.getName().equals("source")) {
				filterConfig.setSource(ParserUtil.parserSource(element));
			} else if (element.getName().equals("dimension")) {
				Iterator<Element> elementsubIter = element.elementIterator();
				while (elementsubIter.hasNext()) {
					filterConfig.getDimension().add(
							ParserUtil.parserDimension(elementsubIter.next()));
				}
			} else if (element.getName().equals("measurement")) {
				filterConfig.setMeasurement(ParserUtil
						.parserMeasurement(element));
			} else if (element.getName().equals("pivot")) {
				filterConfig.getPivot().add(ParserUtil.parserPivot(element));
			} else if (element.getName().equals("profile")) {
				filterConfig.getProfile().setName(element.attributeValue("name"));
				Iterator<Element> elementsubIter = element.elementIterator();
				while (elementsubIter.hasNext()) {
					filterConfig.getProfile().setPivots(ParserUtil.parserPivots(elementsubIter.next()));
				}
			}
		}

		return filterConfig;
	}