@Override public int hashCode() { return toXML(null).hashCode(); }
public CharSequence toXML() { XmlStringBuilder buf = new XmlStringBuilder(); buf.openElement(ELEMENT); // Loop through all the form items and append them to the string buffer for (FormField field : getFields()) { buf.append(field.toXML(null)); } buf.closeElement(ELEMENT); return buf; } }
public CharSequence toXML() { XmlStringBuilder buf = new XmlStringBuilder(); buf.openElement(ELEMENT); // Loop through all the form items and append them to the string buffer for (FormField field : getFields()) { buf.append(field.toXML(null)); } buf.closeElement(ELEMENT); return buf; } }
@Override public XmlStringBuilder toXML(String enclosingNamespace) { XmlStringBuilder buf = new XmlStringBuilder(this); buf.attribute("type", getType()); buf.rightAngleBracket(); buf.optElement("title", getTitle()); for (String instruction : getInstructions()) { buf.element("instructions", instruction); } // Append the list of fields returned from a search if (getReportedData() != null) { buf.append(getReportedData().toXML()); } // Loop through all the items returned from a search and append them to the string buffer for (Item item : getItems()) { buf.append(item.toXML()); } // Loop through all the form fields and append them to the string buffer for (FormField field : getFields()) { buf.append(field.toXML(null)); } for (Element element : extensionElements) { buf.append(element.toXML(null)); } buf.closeElement(this); return buf; }