HashMap<String, String> parseAttributes(String attrStr) {
		HashMap<String, String> keyValues = new HashMap<String, String>();

		if (attrStr.length() > 0) {
			Matcher matcher = ATTRIBUTE_PATTERN.matcher(attrStr);
			while (matcher.find()) {
				if (matcher.groupCount() >= 2) {
					String key = matcher.group(1).toLowerCase();
					String value = matcher.group(2);
					keyValues.put(key, value);
				}
			}
		}

		return keyValues;
	}