public class CDATA extends Text
Text
object, but output behavior is different.
CDATA makes no guarantees about the underlying textual representation of
character data, but does expose that data as a Java String.Modifier | Constructor and Description |
---|---|
protected |
CDATA()
This is the protected, no-args constructor standard in all JDOM
classes.
|
|
CDATA(String string)
This constructor creates a new
CDATA node, with the
supplied string value as it's character content. |
Modifier and Type | Method and Description |
---|---|
void |
append(String str)
This will append character content to whatever content already
exists within this
CDATA node. |
void |
append(Text text)
This will append the content of another
Text node
to this node. |
Text |
setText(String str)
This will set the value of this
CDATA node. |
String |
toString()
This returns a
String representation of the
CDATA node, suitable for debugging. |
clone, getText, getTextNormalize, getTextTrim, getValue, normalizeString
detach, equals, getDocument, getParent, getParentElement, hashCode, setParent
protected CDATA()
public CDATA(String string)
CDATA
node, with the
supplied string value as it's character content.string
- the node's character content.IllegalDataException
- if str
contains an
illegal character such as a vertical tab (as determined
by Verifier.checkCharacterData(java.lang.String)
)
or the CDATA end delimiter ]]>
.public Text setText(String str)
CDATA
node.setText
in class Text
str
- value for node's content.IllegalDataException
- if str
contains an
illegal character such as a vertical tab (as determined
by Verifier.checkCharacterData(java.lang.String)
)
or the CDATA end delimiter ]]>
.public void append(String str)
CDATA
node.append
in class Text
str
- character content to append.IllegalDataException
- if str
contains an
illegal character such as a vertical tab (as determined
by Verifier.checkCharacterData(java.lang.String)
)
or the CDATA end delimiter ]]>
.public void append(Text text)
Text
node
to this node.public String toString()
String
representation of the
CDATA
node, suitable for debugging. If the XML
representation of the CDATA
node is desired,
either Text.getText()
or
XMLOutputter.output(CDATA, java.io.Writer)
should be used.Copyright © 2012 JBoss by Red Hat. All Rights Reserved.