Source:
protected void writeResources(HumanResourceManager resourceManager, TransformerHandler handler) throws SAXException { AttributesImpl attrs = new AttributesImpl(); addAttribute("title", i18n("resourcesList"), attrs); addAttribute("name", i18n("colName"), attrs); addAttribute("role", i18n("colRole"), attrs); addAttribute("mail", i18n("colMail"), attrs); addAttribute("phone", i18n("colPhone"), attrs); addAttribute("rate", i18n("colStandardRate"), attrs); addAttribute("cost", i18n("colTotalCost"), attrs); startPrefixedElement("resources", attrs, handler); { List<HumanResource> resources = resourceManager.getResources(); for (int i = 0; i < resources.size(); i++) { HumanResource p = resources.get(i); addAttribute("id", p.getId(), attrs); startPrefixedElement("resource", attrs, handler); addAttribute("id", "0", attrs); textElement("name", attrs, p.getName(), handler); addAttribute("id", "1", attrs); textElement("role", attrs, p.getRole().getName(), handler); addAttribute("id", "2", attrs); textElement("mail", attrs, p.getMail(), handler); addAttribute("id", "3", attrs); textElement("phone", attrs, p.getPhone(), handler); addAttribute("id", "5", attrs); textElement("rate", attrs, p.getStandardPayRate().toPlainString(), handler); addAttribute("id", "6", attrs); textElement("cost", attrs, p.getTotalCost().toPlainString(), handler); List<CustomProperty> customFields = p.getCustomProperties(); for (int j = 0; j < customFields.size(); j++) { CustomProperty nextProperty = customFields.get(j); addAttribute("id", nextProperty.getDefinition().getID(), attrs); String value = nextProperty.getValueAsString(); textElement("custom-field", attrs, value, handler); } endPrefixedElement("resource", handler); } } endPrefixedElement("resources", handler); }

Target:
protected void writeResources(HumanResourceManager resourceManager, TransformerHandler handler) throws SAXException { AttributesImpl attrs = new AttributesImpl(); addAttribute("title", i18n("resourcesList"), attrs); addAttribute("name", i18n("colName"), attrs); addAttribute("role", i18n("colRole"), attrs); addAttribute("mail", i18n("colMail"), attrs); addAttribute("phone", i18n("colPhone"), attrs); addAttribute("rate", i18n("colStandardRate"), attrs); addAttribute("totalCost", i18n("colTotalCost"), attrs); startPrefixedElement("resources", attrs, handler); { List<HumanResource> resources = resourceManager.getResources(); for (int i = 0; i < resources.size(); i++) { HumanResource p = resources.get(i); addAttribute("id", p.getId(), attrs); startPrefixedElement("resource", attrs, handler); addAttribute("id", "0", attrs); textElement("name", attrs, p.getName(), handler); addAttribute("id", "1", attrs); textElement("role", attrs, p.getRole().getName(), handler); addAttribute("id", "2", attrs); textElement("mail", attrs, p.getMail(), handler); addAttribute("id", "3", attrs); textElement("phone", attrs, p.getPhone(), handler); addAttribute("id", "5", attrs); textElement("rate", attrs, p.getStandardPayRate().toPlainString(), handler); addAttribute("id", "6", attrs); textElement("totalCost", attrs, p.getTotalCost().toPlainString(), handler); List<CustomProperty> customFields = p.getCustomProperties(); for (int j = 0; j < customFields.size(); j++) { CustomProperty nextProperty = customFields.get(j); addAttribute("id", nextProperty.getDefinition().getID(), attrs); String value = nextProperty.getValueAsString(); textElement("custom-field", attrs, value, handler); } endPrefixedElement("resource", handler); } } endPrefixedElement("resources", handler); }