Package org.apache.jorphan.util
Class XMLBuffer
-
- All Implemented Interfaces:
public class XMLBufferProvides XML string building methods. Not synchronised.
-
-
Constructor Summary
Constructors Constructor Description XMLBuffer()
-
Method Summary
Modifier and Type Method Description XMLBufferopenTag(String tagName)Open a tag; save on stack. XMLBuffercloseTag(String tagName)Close top tag from stack. XMLBuffertag(String tagName, CharSequence content)Add a complete tag with content. StringtoString()Convert the buffer to a string, closing any open tags -
-
Method Detail
-
openTag
XMLBuffer openTag(String tagName)
Open a tag; save on stack.
- Parameters:
tagName- name of the tag- Returns:
this
-
closeTag
XMLBuffer closeTag(String tagName)
Close top tag from stack.
- Parameters:
tagName- name of the tag to close- Returns:
this
-
tag
XMLBuffer tag(String tagName, CharSequence content)
Add a complete tag with content.
- Parameters:
tagName- name of the tagcontent- content to put in tag, or empty content, if an empty tag should be used- Returns:
this
-
-
-
-