use of org.jivesoftware.smack.util.XmlStringBuilder in project Smack by igniterealtime.
the class Base64BinaryChunk method toXML.
@Override
public XmlStringBuilder toXML() {
XmlStringBuilder xml = new XmlStringBuilder(this);
xml.attribute("streamId", streamId);
xml.attribute("nr", nr);
xml.optBooleanAttribute("last", last);
xml.rightAngleBracket();
xml.append(text);
xml.closeElement(this);
return xml;
}
use of org.jivesoftware.smack.util.XmlStringBuilder in project Smack by igniterealtime.
the class Compress method toXML.
@Override
public XmlStringBuilder toXML() {
XmlStringBuilder xml = new XmlStringBuilder(this);
xml.rightAngleBracket();
xml.element("method", method);
xml.closeElement(this);
return xml;
}
use of org.jivesoftware.smack.util.XmlStringBuilder in project Smack by igniterealtime.
the class DefaultExtensionElement method toXML.
@Override
public CharSequence toXML() {
XmlStringBuilder buf = new XmlStringBuilder();
buf.halfOpenElement(elementName).xmlnsAttribute(namespace).rightAngleBracket();
for (String name : getNames()) {
String value = getValue(name);
buf.element(name, value);
}
buf.closeElement(elementName);
return buf;
}
use of org.jivesoftware.smack.util.XmlStringBuilder in project Smack by igniterealtime.
the class IQ method toXML.
@Override
public final XmlStringBuilder toXML() {
XmlStringBuilder buf = new XmlStringBuilder();
buf.halfOpenElement(IQ_ELEMENT);
addCommonAttributes(buf);
if (type == null) {
buf.attribute("type", "get");
} else {
buf.attribute("type", type.toString());
}
buf.rightAngleBracket();
buf.append(getChildElementXML());
buf.closeElement(IQ_ELEMENT);
return buf;
}
use of org.jivesoftware.smack.util.XmlStringBuilder in project Smack by igniterealtime.
the class Mechanisms method toXML.
@Override
public XmlStringBuilder toXML() {
XmlStringBuilder xml = new XmlStringBuilder(this);
xml.rightAngleBracket();
for (String mechanism : mechanisms) {
xml.element("mechanism", mechanism);
}
xml.closeElement(this);
return xml;
}
Aggregations