use of org.jivesoftware.smack.util.XmlStringBuilder in project Smack by igniterealtime.
the class DeliveryReceipt method toXML.
@Override
public XmlStringBuilder toXML() {
XmlStringBuilder xml = new XmlStringBuilder(this);
xml.attribute("id", id);
xml.closeEmptyElement();
return xml;
}
use of org.jivesoftware.smack.util.XmlStringBuilder in project Smack by igniterealtime.
the class RSMSet method toXML.
@Override
public XmlStringBuilder toXML() {
XmlStringBuilder xml = new XmlStringBuilder(this);
xml.rightAngleBracket();
xml.optElement("after", after);
xml.optElement("before", before);
xml.optIntElement("count", count);
if (firstString != null) {
xml.halfOpenElement("first");
xml.optIntAttribute("index", firstIndex);
xml.rightAngleBracket();
xml.append(firstString);
xml.closeElement("first");
}
xml.optIntElement("index", index);
xml.optElement("last", last);
xml.optIntElement("max", max);
xml.closeElement(this);
return xml;
}
use of org.jivesoftware.smack.util.XmlStringBuilder in project Smack by igniterealtime.
the class AffiliationsExtension method toXML.
@Override
public CharSequence toXML() {
if ((items == null) || (items.size() == 0)) {
return super.toXML();
} else {
// Can't use XmlStringBuilder(this), because we don't want the namespace to be included
XmlStringBuilder xml = new XmlStringBuilder();
xml.openElement(getElementName());
xml.optAttribute("node", node);
xml.rightAngleBracket();
xml.append(items);
xml.closeElement(this);
return xml;
}
}
use of org.jivesoftware.smack.util.XmlStringBuilder in project Smack by igniterealtime.
the class GetItemsRequest method toXML.
@Override
public XmlStringBuilder toXML() {
XmlStringBuilder xml = new XmlStringBuilder();
xml.halfOpenElement(getElementName());
xml.attribute("node", getNode());
xml.optAttribute("subid", getSubscriptionId());
xml.optIntAttribute("max_items", getMaxItems());
xml.closeEmptyElement();
return xml;
}
use of org.jivesoftware.smack.util.XmlStringBuilder in project Smack by igniterealtime.
the class CarbonExtension method toXML.
@Override
public XmlStringBuilder toXML() {
XmlStringBuilder xml = new XmlStringBuilder(this);
xml.rightAngleBracket();
xml.append(fwd.toXML());
xml.closeElement(this);
return xml;
}
Aggregations