use of org.jivesoftware.smack.util.XmlStringBuilder in project Smack by igniterealtime.
the class OptionsExtension method toXML.
@Override
public XmlStringBuilder toXML() {
XmlStringBuilder xml = new XmlStringBuilder();
xml.halfOpenElement(getElementName());
xml.attribute("jid", jid);
xml.optAttribute("node", getNode());
xml.optAttribute("subid", id);
xml.closeEmptyElement();
return xml;
}
use of org.jivesoftware.smack.util.XmlStringBuilder in project Smack by igniterealtime.
the class UnsubscribeExtension method toXML.
@Override
public XmlStringBuilder toXML() {
XmlStringBuilder xml = new XmlStringBuilder();
xml.halfOpenElement(getElementName());
xml.attribute("jid", jid);
xml.optAttribute("node", getNode());
xml.optAttribute("subid", id);
xml.closeEmptyElement();
return xml;
}
use of org.jivesoftware.smack.util.XmlStringBuilder in project Smack by igniterealtime.
the class FormField method toXML.
@Override
public XmlStringBuilder toXML() {
XmlStringBuilder buf = new XmlStringBuilder(this);
// Add attributes
buf.optAttribute("label", getLabel());
buf.optAttribute("var", getVariable());
buf.optAttribute("type", getType());
buf.rightAngleBracket();
// Add elements
buf.optElement("desc", getDescription());
buf.condEmptyElement(isRequired(), "required");
// Loop through all the values and append them to the string buffer
for (String value : getValues()) {
buf.element("value", value);
}
// Loop through all the values and append them to the string buffer
for (Option option : getOptions()) {
buf.append(option.toXML());
}
buf.optElement(validateElement);
buf.closeElement(this);
return buf;
}
use of org.jivesoftware.smack.util.XmlStringBuilder in project Smack by igniterealtime.
the class Affiliation method toXML.
@Override
public XmlStringBuilder toXML() {
XmlStringBuilder xml = new XmlStringBuilder(this);
xml.optAttribute("node", node);
xml.optAttribute("jid", jid);
xml.optAttribute("affiliation", affiliation);
xml.closeEmptyElement();
return xml;
}
use of org.jivesoftware.smack.util.XmlStringBuilder in project Smack by igniterealtime.
the class EventElement method toXML.
@Override
public XmlStringBuilder toXML() {
XmlStringBuilder xml = new XmlStringBuilder(this);
xml.rightAngleBracket();
xml.append(ext.toXML());
xml.closeElement(this);
return xml;
}
Aggregations