@Override
	protected String createResourceString(ArrayList<StringResource> resource, String locale) {
		StringBuilder sb = new StringBuilder();
		sb.append("<?xml version=\"1.0\" encoding=\"utf-8\"?>");
		sb.append("\n\n");
		sb.append(getAutoGeneratedText());
		sb.append("\n");
		sb.append("<resources>");
		sb.append("\n\t");

		Set<String> keysAdded = new HashSet<String>();

		for (int i = 0; i < resource.size(); i++) {
			StringResource res = resource.get(i);

			if (res != null) {
				String key = sanitiseKeyString(res.getKey());

				if (!key.equals("") && !keysAdded.contains(key)) {
					sb.append("\n\t");
					String originalString = res.getLocaleString(locale);
					String replacedString = regexReplaceInString(originalString);

					boolean stringUpdated = !originalString.equals(replacedString);
					String formattdProperty = "";

					// If a regex took place, make sure the property
					// "formatted=false" is added so it can handle unordered
					// string replacements.
					if (stringUpdated) {
						formattdProperty = " formatted=\"false\"";
					}

					String escapedData = escapeData(replacedString);
					String value = String.format(getStringItemTemplate(), res.getDescription(), key, formattdProperty,
							escapedData);
					sb.append(value);

					keysAdded.add(key);
				}
			}
		}

		sb.append("\n");
		sb.append("</resources>");
		return sb.toString();
	}