org.jdom
public class Text extends Content
Version: $Revision: 1.25 $, $Date: 2007/11/10 05:28:59 $
Field Summary | |
---|---|
protected String | value The actual character content |
Constructor Summary | |
---|---|
protected | Text()
This is the protected, no-args constructor standard in all JDOM
classes. |
Text(String str)
This constructor creates a new Text node, with the
supplied string value as it's character content.
|
Method Summary | |
---|---|
void | append(String str)
This will append character content to whatever content already
exists within this Text node.
|
void | append(Text text)
This will append the content of another Text node
to this node.
|
Object | clone()
This will return a clone of this Text node, with the
same character content, but no parent.
|
String | getText()
This returns the value of this Text node as a Java
String .
|
String | getTextNormalize()
This returns the textual content with all surrounding whitespace
removed and internal whitespace normalized to a single space. |
String | getTextTrim()
This returns the textual content with all surrounding whitespace
removed. |
String | getValue()
Returns the XPath 1.0 string value of this element, which is the
text itself.
|
static String | normalizeString(String str)
This returns a new string with all surrounding whitespace
removed and internal whitespace normalized to a single space. |
Text | setText(String str)
This will set the value of this Text node.
|
String | toString()
This returns a String representation of the
Text node, suitable for debugging. |
Text
node, with the
supplied string value as it's character content.
Parameters: str the node's character content.
Throws: IllegalDataException if str
contains an
illegal character such as a vertical tab (as determined
by Verifier)
Text
node.
Parameters: str character content to append.
Throws: IllegalDataException if str
contains an
illegal character such as a vertical tab (as determined
by Verifier)
Text
node
to this node.
Parameters: text Text node to append.
Text
node, with the
same character content, but no parent.
Returns: Text
- cloned node.
Text
node as a Java
String
.
Returns: String
- character content of this node.
Returns: normalized text content or empty string
Returns: trimmed text content or empty string
Returns: the text
Per XML 1.0 Production 3 whitespace includes: #x20, #x9, #xD, #xA
Parameters: str string to be normalized.
Returns: normalized string or empty string
Text
node.
Parameters: str value for node's content.
Returns: the object on which the method was invoked
Throws: IllegalDataException if str
contains an
illegal character such as a vertical tab (as determined
by Verifier)
String
representation of the
Text
node, suitable for debugging. If the XML
representation of the Text
node is desired,
either Text
or
outputString
should be used.
Returns: String
- information about this node.