Element propertyElem = UtilXml.addChildElement(resourceElem, "property", resourceDocument);
propertyElem.setAttribute("key", StringEscapeUtils.unescapeHtml(labelInfo.getLabelKey()));
if (UtilValidate.isNotEmpty(labelInfo.getLabelKeyComment())) {
Comment labelKeyComment = resourceDocument.createComment(StringEscapeUtils.unescapeHtml(labelInfo.getLabelKeyComment()));
Node parent = propertyElem.getParentNode();
parent.insertBefore(labelKeyComment, propertyElem);
}
for (String localeFound : localesFound) {
LabelValue labelValue = labelInfo.getLabelValue(localeFound);
String valueString = null;
if (labelValue != null) {