use of org.jivesoftware.smack.util.XmlStringBuilder in project Smack by igniterealtime.
the class JingleContentTransport method toXML.
@Override
public XmlStringBuilder toXML(XmlEnvironment xmlEnvironment) {
XmlStringBuilder xml = new XmlStringBuilder(this, xmlEnvironment);
addExtraAttributes(xml);
if (candidates.isEmpty() && info == null) {
xml.closeEmptyElement();
} else {
xml.rightAngleBracket();
xml.append(candidates);
xml.optElement(info);
xml.closeElement(this);
}
return xml;
}
use of org.jivesoftware.smack.util.XmlStringBuilder in project Smack by igniterealtime.
the class JingleReason method toXML.
@Override
public XmlStringBuilder toXML(XmlEnvironment enclosingXmlEnvironment) {
XmlStringBuilder xml = new XmlStringBuilder(this, enclosingXmlEnvironment);
xml.rightAngleBracket();
xml.emptyElement(reason);
xml.optElement(TEXT_ELEMENT, text);
xml.optAppend(element);
xml.closeElement(this);
return xml;
}
use of org.jivesoftware.smack.util.XmlStringBuilder in project Smack by igniterealtime.
the class MUCInitialPresence method toXML.
@Override
public XmlStringBuilder toXML(org.jivesoftware.smack.packet.XmlEnvironment enclosingNamespace) {
XmlStringBuilder xml = new XmlStringBuilder(this);
xml.rightAngleBracket();
xml.optElement("password", getPassword());
xml.optElement(getHistory());
xml.closeElement(this);
return xml;
}
use of org.jivesoftware.smack.util.XmlStringBuilder in project Smack by igniterealtime.
the class MessageCorrectExtension method toXML.
@Override
public XmlStringBuilder toXML(org.jivesoftware.smack.packet.XmlEnvironment enclosingNamespace) {
XmlStringBuilder xml = new XmlStringBuilder(this);
xml.attribute(ID_TAG, getIdInitialMessage());
xml.closeEmptyElement();
return xml;
}
use of org.jivesoftware.smack.util.XmlStringBuilder in project Smack by igniterealtime.
the class MUCItem method toXML.
@Override
public XmlStringBuilder toXML(org.jivesoftware.smack.packet.XmlEnvironment enclosingNamespace) {
XmlStringBuilder xml = new XmlStringBuilder(this);
xml.optAttribute("affiliation", getAffiliation());
xml.optAttribute("jid", getJid());
xml.optAttribute("nick", getNick());
xml.optAttribute("role", getRole());
xml.rightAngleBracket();
xml.optElement("reason", getReason());
if (getActor() != null) {
xml.halfOpenElement("actor").attribute("jid", getActor()).closeEmptyElement();
}
xml.closeElement(Stanza.ITEM);
return xml;
}
Aggregations