public Document toDOM(java.io.Serializable structure) {
		Document dom = super.toDOM(structure);
		TuringMachine tm = (TuringMachine) structure;
		if (tm.tapes() > 1) {
			Element tapesElement = createElement(dom, TURING_TAPES_NAME, null,
					"" + tm.tapes());
			NodeList list = dom.getDocumentElement().getChildNodes();
			if (list.getLength() == 1) // No states or transitions!
				dom.getDocumentElement().appendChild(tapesElement);
			else
				dom.getDocumentElement().insertBefore(tapesElement,
						list.item(1));
		}
		return dom;
	}