@Override public String toXML() { StringBuilder builder = new StringBuilder("<"); builder.append(getElementName()); XmlUtils.appendAttribute(builder, "jid", jid); if (getNode() != null) XmlUtils.appendAttribute(builder, "node", getNode()); if (id != null) XmlUtils.appendAttribute(builder, "subid", id); builder.append("/>"); return builder.toString(); }