public final CharSequence toXML() { XmlStringBuilder buf = new XmlStringBuilder(); buf.halfOpenElement(this.elementName).xmlnsAttribute(this.namespace).rightAngleBracket(); for (String name : getNames()) { buf.element(name, getValue(name)); } buf.closeElement(this.elementName); return buf; }
public XmlStringBuilder element(String name, Enum<?> content) { assert content != null; element(name, content.name()); return this; }
public XmlStringBuilder optIntElement(String name, int value) { if (value >= 0) { element(name, String.valueOf(value)); } return this; }
public XmlStringBuilder optElement(String name, Object object) { if (object != null) { element(name, object.toString()); } return this; }
public XmlStringBuilder optElement(String name, Enum<?> content) { if (content != null) { element(name, content); } return this; }
public XmlStringBuilder optElement(String name, CharSequence content) { if (content != null) { element(name, content.toString()); } return this; }