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.Stringtext
-
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 Textcopy()Simulate clone()BasicNodecopy(Node orig)Copy all data fromorigintothisTextcreateClone()Simulate clone()java.lang.StringgetNormalizedText()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.StringgetText()Get the text from the nodejava.lang.StringgetTrimmedText()Get the contents of this text node without all whitespace before and afterbooleanisCDATA()booleanisWhitespace()True, if this text node contains only whitespaceTextsetText(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:TextNodeGet the text from the node
-
setText
public Text setText(java.lang.String text)
Description copied from interface:TextNodeChange 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:NodeSimulate clone()- Specified by:
createClonein interfaceNode- Overrides:
createClonein classBasicNode
-
copy
public BasicNode copy(Node orig)
Description copied from interface:NodeCopy all data fromorigintothis
-
-