AnsweredAssumed Answered

Defect in FormField.Option class

Question asked by artyom on Jul 30, 2014
Latest reply on Jul 30, 2014 by Flow

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();


            // Add attribute

            xml.optAttribute("label", getLabel());



            // Add element

            xml.element("value", getValue());



            return xml;