use of org.jivesoftware.smack.util.XmlStringBuilder in project Smack by igniterealtime.
the class DelayInformation method toXML.
@Override
public XmlStringBuilder toXML() {
XmlStringBuilder xml = new XmlStringBuilder(this);
xml.attribute("stamp", XmppDateTime.formatXEP0082Date(stamp));
xml.optAttribute("from", from);
xml.rightAngleBracket();
xml.optAppend(reason);
xml.closeElement(this);
return xml;
}
use of org.jivesoftware.smack.util.XmlStringBuilder in project Smack by igniterealtime.
the class RosterVer method toXML.
@Override
public XmlStringBuilder toXML() {
XmlStringBuilder xml = new XmlStringBuilder(this);
xml.closeEmptyElement();
return xml;
}
use of org.jivesoftware.smack.util.XmlStringBuilder in project Smack by igniterealtime.
the class Destroy method toXML.
@Override
public XmlStringBuilder toXML() {
XmlStringBuilder xml = new XmlStringBuilder(this);
xml.optAttribute("jid", getJid());
xml.rightAngleBracket();
xml.optElement("reason", getReason());
xml.closeElement(this);
return xml;
}
use of org.jivesoftware.smack.util.XmlStringBuilder in project Smack by igniterealtime.
the class GroupChatInvitation method toXML.
@Override
public XmlStringBuilder toXML() {
XmlStringBuilder xml = new XmlStringBuilder(this);
xml.attribute("jid", getRoomAddress());
xml.closeEmptyElement();
return xml;
}
use of org.jivesoftware.smack.util.XmlStringBuilder in project Smack by igniterealtime.
the class DataForm method toXML.
@Override
public XmlStringBuilder toXML() {
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());
}
for (Element element : extensionElements) {
buf.append(element.toXML());
}
buf.closeElement(this);
return buf;
}
Aggregations