public RrdExportDef getRrdExportDef() throws RrdException
	{
		// basic check
		if( !root.getTagName().equals("rrd_export_def") )
			throw new RrdException("XML definition must start with <rrd_export_def>");

		validateTagsOnlyOnce( root, new String[] {"span", "options", "datasources", "exports"} );
		def = new RrdExportDef();
        // traverse all nodes
		Node[] childs = getChildNodes(root);
		for(int i = 0; i < childs.length; i++) {
			// SPAN
			String nodeName = childs[i].getNodeName();
            if(nodeName.equals("span")) {
				resolveSpan(childs[i]);
			}
			// OPTIONS
			else if(nodeName.equals("options")) {
				resolveOptions(childs[i]);
			}
			// DATASOURCES
			else if(nodeName.equals("datasources")) {
				resolveDatasources(childs[i]);
			}
			// EXPORTS
			else if(nodeName.equals("exports")) {
				resolveExports(childs[i]);
			}
		}
		return def;
	}