Example #1
0
 public XmlStringBuilder toXML() {
   XmlStringBuilder xml = new XmlStringBuilder(this);
   xml.optIntAttribute("maxchars", getMaxChars());
   xml.optIntAttribute("maxstanzas", getMaxStanzas());
   xml.optIntAttribute("seconds", getSeconds());
   if (getSince() != null) {
     xml.attribute("since", XmppDateTime.formatXEP0082Date(getSince()));
   }
   xml.closeEmptyElement();
   return xml;
 }
Example #2
0
 public XmlStringBuilder toXML() {
   XmlStringBuilder xmlstringbuilder = new XmlStringBuilder();
   xmlstringbuilder.halfOpenElement(getElementName());
   xmlstringbuilder.attribute("node", getNode());
   xmlstringbuilder.optAttribute("subid", getSubscriptionId());
   xmlstringbuilder.optIntAttribute("max_items", getMaxItems());
   xmlstringbuilder.closeEmptyElement();
   return xmlstringbuilder;
 }