private void writeNode(XMLNode node, int tabIndex, FileWriter writer)
			throws IOException {
		String line = formTabs(tabIndex) + "<" + node.getName();
		if (node.getAttributes().size() > 0) {
			for (int i = 0; i < node.getAttributes().size(); i++) {
				line += " " + formAttribute(node.getAttributes().get(i));
			}
		}
		if (node.getChilds().size() == 0) {
			line += "/>";
			writer.write(line + "\n");
		} else {
			line += ">";
			writer.write(line + "\n");
			for (XMLNode child : node.getChilds()) {
				writeNode(child, tabIndex + 1, writer);
			}
			writer.write(formTabs(tabIndex) + "</" + node.getName() + ">\n");
		}
	}