public void save(String fileName)
            throws IOException {
        Document doc = new DocumentImpl();
        Element projectElement = doc.createElement("project");
        doc.appendChild(projectElement);
        projectElement.setAttribute("name", name);
        projectElement.setAttribute("targetType", targetType);
        projectElement.setAttribute("targetName", targetName);
        projectElement.setAttribute("javaOutputDir", javaOutputDir);
        projectElement.setAttribute("cppOutputDir", cppOutputDir);
        projectElement.setAttribute("usePartialSpec", String.valueOf(usePartialSpec));

        Iterator it = peerGenSettingsList.iterator();
        while (it.hasNext() == true) {
            projectElement.appendChild(((PeerGenSettings) it.next()).getDOMNode(doc));
        }

        it = proxyGenSettingsList.iterator();
        while (it.hasNext() == true) {
            projectElement.appendChild(((ProxyGenSettings) it.next()).getDOMNode(doc));
        }

        if (nMakefileSettings != null) {
            projectElement.appendChild(nMakefileSettings.getDOMNode(doc));
        }

        if (gnuMakefileSettings != null) {
            projectElement.appendChild(gnuMakefileSettings.getDOMNode(doc));
        }

        OutputFormat format = new OutputFormat(doc);
        FileWriter outFile = new FileWriter(fileName);
        XMLSerializer serial = new XMLSerializer(outFile, format);
        serial.asDOMSerializer();
        serial.serialize(doc.getDocumentElement());
    }