pw.println("\t\t<email>" + current.getEmailAddress()
pw.println("\t\t<email>" + JFritzUtils.replaceSpecialChars(current.getEmailAddress())
	public synchronized void saveToXMLFile(String filename) {		Debug.msg("Saving to file " + filename);		FileOutputStream fos;		try {			fos = new FileOutputStream(filename);			PrintWriter pw = new PrintWriter(fos);			pw.println("<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>");			pw.println("<!DOCTYPE phonebook SYSTEM \"" + PHONEBOOK_DTD_URI					+ "\">");			pw.println("<phonebook>");			pw.println("<comment>Phonebook for " + JFritz.PROGRAM_NAME + " v"					+ JFritz.PROGRAM_VERSION + "</comment>");			Enumeration en = persons.elements();			while (en.hasMoreElements()) {				Person current = (Person) en.nextElement();				pw.println("<entry>");				if (current.getFullname().length() > 0) {					pw.println("\t<name>");					if (current.getFirstName().length() > 0)						pw.println("\t\t<firstname>" + current.getFirstName()								+ "</firstname>");					if (current.getLastName().length() > 0)						pw.println("\t\t<lastname>" + current.getLastName()								+ "</lastname>");					pw.println("\t</name>");					if (current.getCompany().length() > 0)						pw.println("\t<company>" + current.getCompany()								+ "</company>");				}				if ((current.getStreet().length() > 0)						|| (current.getPostalCode().length() > 0)						|| (current.getCity().length() > 0)) {					pw.println("\t<address>");					if (current.getStreet().length() > 0)						pw.println("\t\t<street>" + current.getStreet()								+ "</street>");					if (current.getPostalCode().length() > 0)						pw.println("\t\t<postcode>" + current.getPostalCode()								+ "</postcode>");					if (current.getCity().length() > 0)						pw								.println("\t\t<city>" + current.getCity()										+ "</city>");					pw.println("\t</address>");				}				pw.println("\t<phonenumbers standard=\""						+ current.getStandard() + "\">");				Enumeration en2 = current.getNumbers().elements();				while (en2.hasMoreElements()) {					PhoneNumber nr = (PhoneNumber) en2.nextElement();					pw.println("\t\t<number type=\"" + nr.getType() + "\">"							+ nr.getFullNumber() + "</number>");				}				pw.println("\t</phonenumbers>");				if (current.getEmailAddress().length() > 0) {					pw.println("\t<internet>");					if (current.getEmailAddress().length() > 0)						pw.println("\t\t<email>" + current.getEmailAddress()								+ "</email>");					pw.println("\t</internet>");				}				/*				 * if (current.getCategory().length() > 0) { pw.println("\t				 * <categories>"); if (current.getCategory().length() > 0)				 * pw.println("\t\t <category>" + current.getCategory() + "				 * </category>"); pw.println("\t </categories>"); }				 */				pw.println("</entry>");			}			pw.println("</phonebook>");			pw.close();		} catch (FileNotFoundException e) {			Debug.err("Could not write " + filename + "!");		}	}