public GeneticCode parseGeneticCode(File f) throws SAXException, IOException {
		int symmetry, mirror;
		boolean disperse;
		List<Gene> genes = new ArrayList<Gene>();
		String s;
		doc = builder.parse(f);
		Element geneticCode = doc.getDocumentElement();
		if (geneticCode.getNodeName().equals("genetic_code")) { //$NON-NLS-1$
			s = geneticCode.getAttribute("symmetry"); //$NON-NLS-1$
			try {
				symmetry = Integer.parseInt(s); //$NON-NLS-1$
			} catch (NumberFormatException e) {
				throw new SAXException("Symmetry has not an allowed value."); //$NON-NLS-1$
			}
			if (symmetry<1 || symmetry>8)
				throw new SAXException("Symmetry has not an allowed value."); //$NON-NLS-1$
			s = geneticCode.getAttribute("mirror"); //$NON-NLS-1$
			if (s.equals("yes")) //$NON-NLS-1$
				mirror = 1;
			else
				if (s.equals("no")) //$NON-NLS-1$
					mirror = 0;
				else
					throw new SAXException("Mirror has not an allowed value."); //$NON-NLS-1$
			s = geneticCode.getAttribute("disperse"); //$NON-NLS-1$
			if (s.equals("yes")) //$NON-NLS-1$
				disperse = true;
			else
				if (s.equals("no")) //$NON-NLS-1$
					disperse = false;
				else
					throw new SAXException("Disperse has not an allowed value."); //$NON-NLS-1$
			
			Node gene = geneticCode.getFirstChild();
			gene = getNextElement(gene);
			while (gene != null) {
				genes.add(parseGene((Element)gene));
				gene = getNextElement(gene.getNextSibling());
			}
			return new GeneticCode(genes, symmetry, mirror, disperse);
		}
		throw new SAXException("This file does not contain a genetic_code."); //$NON-NLS-1$
	}