Smack 4.0.1
toXML method of org.jivesoftware.smackx.xdata.FormField.Option class produces invalid XML string because of the close element is ‘field’ instead of ‘option’ (see code below):
public class FormField {
public static final String ELEMENT = “field”;
…
public static class Option {
public static final String ELEMNT = “option”;
…
public XmlStringBuilder toXML() {
XmlStringBuilder xml = new XmlStringBuilder();
xml.halfOpenElement(ELEMNT);
// Add attribute
xml.optAttribute(“label”, getLabel());
xml.rightAngelBracket();
// Add element
xml.element(“value”, getValue());
xml.closeElement(ELEMENT);
return xml;
}
…
}
}