Contents | Package | Class | Tree | Deprecated | Index | Help | XML for Java 1.0.4 | ||
PREV | NEXT | SHOW LISTS | HIDE LISTS |
java.lang.Object | +----com.ibm.xml.parser.Child | +----com.ibm.xml.parser.TXText
The Text object contains the non-markup content of an Element. If there is no markup inside an Element's content, the text will be contained in a single Text object that is the child of the Element. Any markup will parse into Child Elements that are siblings of the Text Nodes on either side of it, and whose content will be represented as Text Node children of the markup Element.
Fields inherited from class com.ibm.xml.parser.Child |
ATTDEF, ATTLIST, DOCUMENTTYPE, ELEMENTDEFINITION, ENTITY, GENERALREFERENCE, NOTATION, PSEUDONODE |
Constructor Summary | |
TXText(java.lang.String data)
|
Method Summary | |
void | acceptPost(Visitor visitor)
|
void | acceptPre(Visitor visitor)
|
void | append(java.lang.String data)
|
java.lang.Object | clone()
|
void | delete(int offset,
int count)
|
java.lang.String | getData()
|
boolean | getIsIgnorableWhitespace()
|
java.lang.String | getLanguage()
xml:lang attribute) in
use for this Text Node.
|
int | getNodeType()
|
java.lang.String | getText()
|
void | insert(int offset,
java.lang.String data)
|
static java.lang.String | makePrintable(java.lang.String string)
|
void | replace(int offset,
int count,
java.lang.String data)
|
void | setData(java.lang.String data)
|
void | setIsIgnorableWhitespace(boolean isIgnorableWhitespace)
|
void | splice(Element element,
int offset,
int count)
|
static java.lang.String | trim(java.lang.String string)
|
static java.lang.String | trim(java.lang.String string,
boolean trimHead,
boolean trimTail)
|
Methods inherited from class com.ibm.xml.parser.Child |
clearDigest, clone, getChildNodes, getDigest, getFactory, getFirstChild, getNextSibling, getParentNode, getPreviousSibling, getText, hasChildNodes, insertBefore, makeXPointer, print, print, removeChild, replaceChild, searchAncestors, searchAncestors, setFactory, toXMLString, toXMLString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TXText(java.lang.String data)
data
- The actual content of the Text Node.
Method Detail |
public java.lang.Object clone()
This method is defined by Child.
public int getNodeType()
This method is defined by DOM.
public java.lang.String getData()
public void setData(java.lang.String data)
data
- The actual content of the Text Node.
public java.lang.String getText()
This method is defined by Child.
public boolean getIsIgnorableWhitespace()
=true
space is to be preserved;
=false
space is to be ignored.public void setIsIgnorableWhitespace(boolean isIgnorableWhitespace)
By default, this Text Node is not ignorable whitespace. The XML4J parser may, depending on the value if its isPreserveSpace, override this default setting if no significant text is detected for this Text Node.
isIgnorableWhitespace
- =true
space is to be preserved;
=false
space is to be ignored.
public java.lang.String getLanguage()
xml:lang
attribute) in
use for this Text Node. If this Text Node has no explicitly defined language attribute,
Parent Nodes will be recursively checked.public void append(java.lang.String data)
This method is defined by DOM.
data
- Data to append to existing character data in this Text Node.
public void insert(int offset, java.lang.String data)
This method is defined by DOM.
offset
- 0-based offset into existing character data in this Text Node.
data
- Data to insert into existing character data in this Text Node.
public void delete(int offset, int count)
This method is defined by DOM.
offset
- 0-based offset into existing character data in this Text Node.
count
- Number of characters to delete.
public void replace(int offset, int count, java.lang.String data)
This method is defined by DOM.
offset
- 0-based offset into existing character data in this Text Node.
count
- Number of existing characters to replace.
data
- Data to insert into existing character data in this Text Node.
public void splice(Element element, int offset, int count) throws java.lang.IllegalArgumentException, java.lang.RuntimeException
This method is defined by DOM.
element
- The Element to insert in the tree; this instance must be an instance of TXElement.
offset
- 0-based offset into existing character data in this Text Node.
count
- Number of characters to copy to Child Text Node of Element.
public static java.lang.String trim(java.lang.String string)
string
- String to be trimmed.
public static java.lang.String trim(java.lang.String string, boolean trimHead, boolean trimTail)
string
- String to be trimmed.
trimHead
- Trim leading whitespace?
trimTail
- Trim trailing whitespace?
public static java.lang.String makePrintable(java.lang.String string)
string
- String to translate.
public void acceptPre(Visitor visitor) throws java.lang.Exception
visitor
- The implemention of the Visitor operation (toXMLString, digest, ...)
public void acceptPost(Visitor visitor) throws java.lang.Exception
visitor
- The implemention of the Visitor operation (toXMLString, digest, ...)
Contents | Package | Class | Tree | Deprecated | Index | Help | |||
PREV | NEXT | SHOW LISTS | HIDE LISTS |