Package org.apache.jorphan.util
Class XMLBuffer
java.lang.Object
org.apache.jorphan.util.XMLBuffer
Provides XML string building methods.
 Not synchronised.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionClose top tag from stack.Open a tag; save on stack.tag(String tagName, CharSequence content) Add a complete tag with content.toString()Convert the buffer to a string, closing any open tags
- 
Constructor Details- 
XMLBufferpublic XMLBuffer()
 
- 
- 
Method Details- 
openTagOpen a tag; save on stack.- Parameters:
- tagName- name of the tag
- Returns:
- this
 
- 
closeTagClose top tag from stack.- Parameters:
- tagName- name of the tag to close
- Returns:
- this
- Throws:
- IllegalArgumentException- if the tag names do not match
 
- 
tagAdd a complete tag with content.- Parameters:
- tagName- name of the tag
- content- content to put in tag, or empty content, if an empty tag should be used
- Returns:
- this
 
- 
toStringConvert the buffer to a string, closing any open tags
 
-