@Override public XmlStringBuilder toXML(String enclosingNamespace) { 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; } }
@Override public XmlStringBuilder toXML(String enclosingNamespace) { XmlStringBuilder buf = new XmlStringBuilder(); buf.halfOpenElement(this).attribute("type", type); buf.optAttribute("jid", jid); buf.optAttribute("node", node); buf.optAttribute("desc", description); if (description != null && description.trim().length() > 0) { buf.append(" desc=\""); buf.append(description).append('"'); } buf.optBooleanAttribute("delivered", delivered); buf.optAttribute("uri", uri); buf.closeEmptyElement(); return buf; } }
@Override public XmlStringBuilder toXML(String enclosingNamespace) { XmlStringBuilder xml = new XmlStringBuilder(this); xml.attribute("jid", jid); xml.optAttribute("name", name); xml.optAttribute("subscription", itemType); if (subscriptionPending) { xml.append(" ask='subscribe'"); } xml.optBooleanAttribute("approved", approved); xml.rightAngleBracket(); for (String groupName : groupNames) { xml.openElement(GROUP).escape(groupName).closeElement(GROUP); } xml.closeElement(this); return xml; }
@Override public XmlStringBuilder toXML(String enclosingNamespace) { 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; } }
@Override public XmlStringBuilder toXML(String enclosingNamespace) { XmlStringBuilder xml = new XmlStringBuilder(this); xml.attribute("jid", jid); xml.optAttribute("name", name); xml.optAttribute("subscription", itemType); if (subscriptionPending) { xml.append(" ask='subscribe'"); } xml.optBooleanAttribute("approved", approved); xml.rightAngleBracket(); for (String groupName : groupNames) { xml.openElement(GROUP).escape(groupName).closeElement(GROUP); } xml.closeElement(this); return xml; }