private Document constructXml(Document xml) {
		Element rootElement = xml.createElement(VCNConstants.ROOT);
		rootElement.setAttribute(VCNConstants.XML_FORMAT_VERSION_ATTR_NAME, VCNConstants.XML_FORMAT_VERSION);
		addOption(rootElement, VCNConstants.TREE_FONT_SIZE, VCNTreeItem.getFontSize());
		addOption(rootElement, VCNConstants.EDITOR_FONT_SIZE, Editor.getFontSize());
		addOption(rootElement, VCNConstants.TREE_LINES, VCNConfiguration.isTreeLines);
		Color sc = VCNConfiguration.getGradientSelectionColor();
		// see bug
		if (sc != null) {
			addOption(rootElement, VCNConstants.TREE_SELECTION_COLOR, sc.getRed() + "-" + sc.getGreen() + "-" + sc.getBlue());
		}
		
		xml.appendChild(rootElement);

		TreeItem[] treeItems = vermilionCascadeNotebook.getTree().getItems();
		for (TreeItem treeItem : treeItems) {
			addNode(rootElement, treeItem, xml);
		}

		return xml;
	}