private void xmlBuildRootNode(Node node) throws SAXException {

		if (node.getNodeType() == Node.ELEMENT_NODE) {
			Element elt = (Element) node;
			String name = elt.getNodeName();
			if (name.equals("DockingPanel")) {

				// only one child at most
				NodeList children = elt.getChildNodes();
				for (int i = 0, len = children.getLength(); i < len; i++) {
					xmlBuildDockingPanelNode(elt.getChildNodes().item(i));
				}
				try {
					final int x = Integer.parseInt(elt.getAttribute("x"));
					final int y = Integer.parseInt(elt.getAttribute("y"));

					final int width = Integer.parseInt(elt
							.getAttribute("width"));
					final int height = Integer.parseInt(elt
							.getAttribute("height"));

					Window w = SwingUtilities
							.getWindowAncestor(DockingDesktop.this);
					if (w != null && w.isVisible()) {
						w.setBounds(x, y, width, height);
					}
					// will make window bounce :-(
					addAncestorListener(new AncestorListener() {
						@Override
						public void ancestorAdded(AncestorEvent event) {
							Window w = SwingUtilities
									.getWindowAncestor(DockingDesktop.this);
							w.setBounds(x, y, width, height);
							removeAncestorListener(this);
						}

						@Override
						public void ancestorRemoved(AncestorEvent event) {
						}

						@Override
						public void ancestorMoved(AncestorEvent event) {
						}
					});
				} catch (Exception e) {
					log.debug("", e);
				}
			} else if (name.equals("Border")) {
				int zone = Integer.parseInt(elt.getAttribute("zone"));
				AutoHideButtonPanel borderPanel = borderPanes[zone];
				borderPanel.setVisible(true); // border may not be visible
				NodeList children = elt.getElementsByTagName("Dockable");
				for (int i = 0, len = children.getLength(); i < len; i++) {
					xmlBuildAutoHideNode(borderPanel,
							(Element) children.item(i));
				}
				borderPanel.revalidate();
			} else if (name.equals("Floating")) {
				int x = Integer.parseInt(elt.getAttribute("x"));
				int y = Integer.parseInt(elt.getAttribute("y"));
				int width = Integer.parseInt(elt.getAttribute("width"));
				int height = Integer.parseInt(elt.getAttribute("height"));
				Rectangle r = new Rectangle(x, y, width, height);
				GraphicsEnvironment ge = GraphicsEnvironment
						.getLocalGraphicsEnvironment();
				GraphicsDevice[] gs = ge.getScreenDevices();
				for (int j = 0; j < gs.length; j++) {
					GraphicsDevice gd = gs[j];
					GraphicsConfiguration[] gc = gd.getConfigurations();
					for (int i = 0; i < gc.length; i++) {

						if (gc[i].getBounds().contains(r)) {
							// log.error(r + " is on screen[" + j + "] "
							// + gc[i].getBounds());
						} else {
							// log.error(r + " is NOT on screen[" + j + "] "
							// + gc[i].getBounds());
						}
					}
				}

				NodeList children = elt.getElementsByTagName("Dockable");
				xmlBuildFloatingNode(children, new Rectangle(x, y, width,
						height)); // 2005/10/10

				/*
				 * for (int i = 0, len = children.getLength(); i < len; i++) {
				 * xmlBuildFloatingNode((Element)children.item(i), new
				 * Rectangle(x, y, width, height)); }
				 */
			} else if (name.equals("TabGroups")) {
				NodeList children = elt.getElementsByTagName("TabGroup");
				xmlBuildTabGroup(children); // 2005/10/10
			} else {
				throw new SAXNotRecognizedException(name);
			}
		}
	}