|
|||||||||
| Home >> All >> org >> [ jdom overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.jdom
Class Text

java.lang.Objectorg.jdom.Content
org.jdom.Text
- All Implemented Interfaces:
- java.lang.Cloneable, java.io.Serializable
- Direct Known Subclasses:
- CDATA
- public class Text
- extends Content
Character-based XML content. Provides a modular, parentable method of representing text. Text makes no guarantees about the underlying textual representation of character data, but does expose that data as a Java String.
- Version:
- $Revision: 1.24 $, $Date: 2004/02/27 11:32:57 $
| Field Summary | |
private static java.lang.String |
CVS_ID
|
(package private) static java.lang.String |
EMPTY_STRING
|
protected java.lang.String |
value
The actual character content |
| Fields inherited from class org.jdom.Content |
parent |
| Constructor Summary | |
protected |
Text()
This is the protected, no-args constructor standard in all JDOM classes. |
|
Text(java.lang.String str)
This constructor creates a new Text node, with the
supplied string value as it's character content. |
| Method Summary | |
void |
append(java.lang.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. |
java.lang.Object |
clone()
This will return a clone of this Text node, with the
same character content, but no parent. |
java.lang.String |
getText()
This returns the value of this Text node as a Java
String. |
java.lang.String |
getTextNormalize()
This returns the textual content with all surrounding whitespace removed and internal whitespace normalized to a single space. |
java.lang.String |
getTextTrim()
This returns the textual content with all surrounding whitespace removed. |
java.lang.String |
getValue()
Returns the XPath 1.0 string value of this element, which is the text itself. |
static java.lang.String |
normalizeString(java.lang.String str)
This returns a new string with all surrounding whitespace removed and internal whitespace normalized to a single space. |
Text |
setText(java.lang.String str)
This will set the value of this Text node. |
java.lang.String |
toString()
This returns a String representation of the
Text node, suitable for debugging. |
| Methods inherited from class org.jdom.Content |
detach, equals, getDocument, getParent, getParentElement, hashCode, setParent |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
CVS_ID
private static final java.lang.String CVS_ID
- See Also:
- Constant Field Values
EMPTY_STRING
static final java.lang.String EMPTY_STRING
- See Also:
- Constant Field Values
value
protected java.lang.String value
- The actual character content
| Constructor Detail |
Text
protected Text()
- This is the protected, no-args constructor standard in all JDOM
classes. It allows subclassers to get a raw instance with no
initialization.
Text
public Text(java.lang.String str)
- This constructor creates a new
Textnode, with the supplied string value as it's character content.
| Method Detail |
getText
public java.lang.String getText()
- This returns the value of this
Textnode as a JavaString.
getTextTrim
public java.lang.String getTextTrim()
- This returns the textual content with all surrounding whitespace
removed. If only whitespace exists, the empty string is returned.
getTextNormalize
public java.lang.String getTextNormalize()
- This returns the textual content with all surrounding whitespace
removed and internal whitespace normalized to a single space. If
only whitespace exists, the empty string is returned.
normalizeString
public static java.lang.String normalizeString(java.lang.String str)
- This returns a new string with all surrounding whitespace
removed and internal whitespace normalized to a single space. If
only whitespace exists, the empty string is returned.
Per XML 1.0 Production 3 whitespace includes: #x20, #x9, #xD, #xA
setText
public Text setText(java.lang.String str)
- This will set the value of this
Textnode.
append
public void append(java.lang.String str)
- This will append character content to whatever content already
exists within this
Textnode.
append
public void append(Text text)
- This will append the content of another
Textnode to this node.
getValue
public java.lang.String getValue()
- Returns the XPath 1.0 string value of this element, which is the
text itself.
toString
public java.lang.String toString()
- This returns a
Stringrepresentation of theTextnode, suitable for debugging. If the XML representation of theTextnode is desired, eitherorgetText()55org.jdom.output.XMLOutputter#outputString(Text)should be used.
clone
public java.lang.Object clone()
- This will return a clone of this
Textnode, with the same character content, but no parent.
|
|||||||||
| Home >> All >> org >> [ jdom overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC