Package oracle.stellent.ridc.common.xml
Class XMLStringBuilder
java.lang.Object
oracle.stellent.ridc.common.xml.XMLStringBuilder
Helper class for building XML documents from string buffer objects
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddAttribute(String name, String value, StringBuffer sb, boolean finishTag) Add an XML node attributestatic voidaddCDataSection(String cdata, StringBuffer sb) Add a CDATA section with the given contentstatic voidaddTextNode(String name, String text, boolean isCData, StringBuffer sb) Add a text node with the given text valuestatic voidClose the CDATA sectionstatic voidcloseTag(String name, StringBuffer sb) Close an element tagstatic voidOpen the CDATA sectionstatic voidopenCloseTag(String name, StringBuffer sb) Draw an empty tagstatic voidopenTag(String name, StringBuffer sb, boolean keepOpenForAttrs) Draw an element tag
-
Constructor Details
-
XMLStringBuilder
public XMLStringBuilder()
-
-
Method Details
-
openCDataSection
Open the CDATA section- Parameters:
sb- the XML buffer
-
closeCDataSection
Close the CDATA section- Parameters:
sb- the XML Buffer
-
addCDataSection
Add a CDATA section with the given content- Parameters:
cdata- the CDATA contentsb- the XML Buffer
-
addTextNode
Add a text node with the given text value- Parameters:
name- the name of the nodetext- the text for the nodeisCData- if true, the text is wrapped in a CDATA sectionsb- the XML buffer
-
addAttribute
Add an XML node attribute- Parameters:
name- the attribute namevalue- the attribute valuesb- the XML bufferfinishTag- if true the tag is closed, false to leave open
-
openCloseTag
Draw an empty tag- Parameters:
name- the tag namesb- the XML buffer
-
openTag
Draw an element tag- Parameters:
name- the element namesb- the XML bufferkeepOpenForAttrs- if true, the element will be left open for attributes
-
closeTag
Close an element tag- Parameters:
name- the element namesb- the XML buffer
-