toXMLFields(fields, "group", group);
toXMLFields(fields, "group", group, dataDictionary);
    public void toXMLFields(Element message, String section, FieldMap fieldMap) throws FieldNotFound {        Document document = message.getOwnerDocument();        Element fields = document.createElement(section);        message.appendChild(fields);        Iterator fieldItr = fieldMap.iterator();        while (fieldItr.hasNext()) {            StringField field = (StringField) fieldItr.next();            Element fieldElement = document.createElement("field");            if (dataDictionary != null) {                String name = dataDictionary.getFieldName(field.getTag());                if (name != null) {                    fieldElement.setAttribute("name", name);                }                String enumValue = dataDictionary.getValueName(field.getTag(), field.getValue());                if (enumValue != null) {                    fieldElement.setAttribute("enum", enumValue);                }            }            fieldElement.setAttribute("number", Integer.toString(field.getTag()));            CDATASection value = document.createCDATASection(field.getValue());            fieldElement.appendChild(value);            fields.appendChild(fieldElement);        }        Iterator groupKeyItr = fieldMap.groupKeyIterator();        while (groupKeyItr.hasNext()) {            int groupKey = ((Integer) groupKeyItr.next()).intValue();            List groups = fieldMap.getGroups(groupKey);            Iterator groupItr = groups.iterator();            while (groupItr.hasNext()) {                Group group = (Group) groupItr.next();                toXMLFields(fields, "group", group);            }        }    }