Search in sources :

Example 11 with XmlStringBuilder

use of org.jivesoftware.smack.util.XmlStringBuilder in project Smack by igniterealtime.

the class StreamError method toXML.

@Override
public XmlStringBuilder toXML() {
    XmlStringBuilder xml = new XmlStringBuilder();
    xml.openElement(ELEMENT);
    xml.halfOpenElement(condition.toString()).xmlnsAttribute(NAMESPACE).closeEmptyElement();
    addDescriptiveTextsAndExtensions(xml);
    xml.closeElement(ELEMENT);
    return xml;
}
Also used : XmlStringBuilder(org.jivesoftware.smack.util.XmlStringBuilder)

Example 12 with XmlStringBuilder

use of org.jivesoftware.smack.util.XmlStringBuilder in project Smack by igniterealtime.

the class StreamOpen method toXML.

@Override
public XmlStringBuilder toXML() {
    XmlStringBuilder xml = new XmlStringBuilder(this);
    xml.attribute("to", to);
    xml.attribute("xmlns:stream", "http://etherx.jabber.org/streams");
    xml.attribute("version", VERSION);
    xml.optAttribute("from", from);
    xml.optAttribute("id", id);
    xml.xmllangAttribute(lang);
    xml.rightAngleBracket();
    return xml;
}
Also used : XmlStringBuilder(org.jivesoftware.smack.util.XmlStringBuilder)

Example 13 with XmlStringBuilder

use of org.jivesoftware.smack.util.XmlStringBuilder in project Smack by igniterealtime.

the class MultipleAddresses method toXML.

@Override
public XmlStringBuilder toXML() {
    XmlStringBuilder buf = new XmlStringBuilder(this);
    buf.rightAngleBracket();
    // Loop through all the addresses and append them to the string buffer
    for (Address address : addresses) {
        buf.append(address.toXML());
    }
    buf.closeElement(this);
    return buf;
}
Also used : XmlStringBuilder(org.jivesoftware.smack.util.XmlStringBuilder)

Example 14 with XmlStringBuilder

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;
}
Also used : XmlStringBuilder(org.jivesoftware.smack.util.XmlStringBuilder)

Example 15 with XmlStringBuilder

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;
}
Also used : XmlStringBuilder(org.jivesoftware.smack.util.XmlStringBuilder)

Aggregations

XmlStringBuilder (org.jivesoftware.smack.util.XmlStringBuilder)59 IQChildElementXmlStringBuilder (org.jivesoftware.smack.packet.IQ.IQChildElementXmlStringBuilder)3 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 ObjectOutputStream (java.io.ObjectOutputStream)1 LinkedHashMap (java.util.LinkedHashMap)1 Map (java.util.Map)1 Element (org.jivesoftware.smack.packet.Element)1 ExtensionElement (org.jivesoftware.smack.packet.ExtensionElement)1 MultiMap (org.jivesoftware.smack.util.MultiMap)1 FormField (org.jivesoftware.smackx.xdata.FormField)1