public class XmlTag extends BaseTag
| Modifier and Type | Field and Description | 
|---|---|
| static java.lang.String | XML_HDRStandard xml header with no encoding. | 
| static java.lang.String | XML_HDR_UTF8Standard xml header with utf-8 encoding. | 
| Constructor and Description | 
|---|
| XmlTag(java.lang.String tagIn)Constructs an XmlTag. | 
| XmlTag(java.lang.String tagIn,
      boolean spaceBefore)Constructs an XmlTag. | 
addBody, addBody, getTag, hasBody, removeAttribute, render, renderBody, renderCloseTag, renderOpenTag, renderOpenTag, setAttribute, setBodypublic static final java.lang.String XML_HDR_UTF8
Example usage:
 
 StringBuffer buf = new StringBuffer(); 
 buf.append(XmlTag.XML_HDR_UTF8); 
 buf.append(new XmlTag("foo").render());
 
public static final java.lang.String XML_HDR
Example usage:
 
 StringBuffer buf = new StringBuffer(); 
 buf.append(XmlTag.XML_HDR); 
 buf.append(new XmlTag("foo").render());
 
public XmlTag(java.lang.String tagIn)
tagIn - the name of the tagpublic XmlTag(java.lang.String tagIn,
              boolean spaceBefore)
spaceBefore attribute controls
 whether a space is inserted before the closing tag of a single line
 element.
 For example, a true value for spaceBefore and a tagIn of "foo" will render <foo />. A spaceBefore value of false would've rendered <foo/>.
tagIn - the name of the tagspaceBefore - true if you want a space before the closing tag.