Example #1
0
 public XmlStringBuilder toXML() {
   XmlStringBuilder xml = new XmlStringBuilder();
   xml.halfOpenElement("identity");
   xml.xmllangAttribute(lang);
   xml.attribute("category", category);
   xml.optAttribute("name", name);
   xml.optAttribute("type", type);
   xml.closeEmptyElement();
   return xml;
 }
Example #2
0
 /**
  * Add to, from, id and 'xml:lang' attributes
  *
  * @param xml
  */
 protected void addCommonAttributes(XmlStringBuilder xml) {
   xml.optAttribute("to", getTo());
   xml.optAttribute("from", getFrom());
   xml.optAttribute("id", getStanzaId());
   xml.xmllangAttribute(getLanguage());
 }