private String createXMLString(ArrayList<String[]> data) {
		Date today = new Date();
		SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd");
		String updated = fmt.format(today);

		String xml = "<?xml version='1.0' encoding='UTF-8'?>\n"
				+ "<registry xmlns='www.iana.org/assignments/port-numbers' id='ports'>\n\t"
				+ "<title>Parsed Ports</title>\n\t"
				+ "<updated>"
				+ updated
				+ "</updated>\n\t"
				+ "<parsed>"
				+ new Date()
				+ "</parsed>\n\t"
				+ "<note>Data obtained from www.iana.org/assignments/port-numbers</note>\n\t";
		StringBuilder builder = new StringBuilder(xml);
		for (int i = 0; i < data.size(); i++) {
			// Checking for ampersands and replacing
			if (data.get(i)[3] != null && data.get(i)[3].contains("&"))
				data.get(i)[3] = data.get(i)[3].substring(0,
						data.get(i)[3].indexOf('&'))
						+ "&amp;"
						+ data.get(i)[3]
								.substring(data.get(i)[3].indexOf('&') + 1);

			if (data.get(i)[2] != null && data.get(i)[2].contains("&"))
				data.get(i)[2] = data.get(i)[2].substring(0,
						data.get(i)[2].indexOf('&'))
						+ "&amp;"
						+ data.get(i)[2]
								.substring(data.get(i)[2].indexOf('&') + 1);

			builder.append("<record>\n\t\t<number>" + data.get(i)[0]
					+ "</number>\n\t\t" + "<protocol>" + data.get(i)[1]
					+ "</protocol>\n\t\t" + "<name>" + data.get(i)[2]
					+ "</name>\n\t\t" + "<description>" + data.get(i)[3]
					+ "</description>\n\t</record>");
		}
		builder.append("</registry>");
		data = null;

		return builder.toString();
	}