Package de.pdark.decentxml
Class Text
- java.lang.Object
-
- de.pdark.decentxml.BasicNode
-
- de.pdark.decentxml.Text
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
text
-
Constructor Summary
Constructors Constructor Description Text(Token token)
Text(XMLTokenizer.Type type, java.lang.String text)
Text(java.lang.String text)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Text
copy()
Simulate clone()BasicNode
copy(Node orig)
Copy all data fromorig
intothis
Text
createClone()
Simulate clone()java.lang.String
getNormalizedText()
Get the contents of this text node without all whitespace before and after and with all whitespace between the words in the node reduced to a single space.java.lang.String
getText()
Get the text from the nodejava.lang.String
getTrimmedText()
Get the contents of this text node without all whitespace before and afterboolean
isCDATA()
boolean
isWhitespace()
True, if this text node contains only whitespaceText
setText(java.lang.String text)
Change the text of the node.
-
-
-
Constructor Detail
-
Text
public Text(Token token)
-
Text
public Text(XMLTokenizer.Type type, java.lang.String text)
-
Text
public Text(java.lang.String text)
-
-
Method Detail
-
isCDATA
public boolean isCDATA()
-
getText
public java.lang.String getText()
Description copied from interface:TextNode
Get the text from the node
-
setText
public Text setText(java.lang.String text)
Description copied from interface:TextNode
Change the text of the node. When necessary, the text will be escaped before writing it to the output stream.
-
getTrimmedText
public java.lang.String getTrimmedText()
Get the contents of this text node without all whitespace before and after
-
getNormalizedText
public java.lang.String getNormalizedText()
Get the contents of this text node without all whitespace before and after and with all whitespace between the words in the node reduced to a single space.
-
isWhitespace
public boolean isWhitespace()
True, if this text node contains only whitespace
-
createClone
public Text createClone()
Description copied from interface:Node
Simulate clone()- Specified by:
createClone
in interfaceNode
- Overrides:
createClone
in classBasicNode
-
copy
public BasicNode copy(Node orig)
Description copied from interface:Node
Copy all data fromorig
intothis
-
-