public class DomText extends DomCharacterData
DomNode.ChildIterator, DomNode.DescendantElementsIterator
Modifier and Type | Field and Description |
---|---|
static String |
NODE_NAME
the symbolic node name
|
ATTRIBUTE_NODE, COMMENT_NODE, DOCUMENT_NODE, ELEMENT_NODE, PROPERTY_ELEMENT, READY_STATE_COMPLETE, READY_STATE_INTERACTIVE, READY_STATE_LOADED, READY_STATE_LOADING, READY_STATE_UNINITIALIZED, TEXT_NODE
Constructor and Description |
---|
DomText(Page page,
String data)
Create an instance of DomText
|
Modifier and Type | Method and Description |
---|---|
String |
asText()
Returns a text representation of this element that represents what would
be visible to the user if this page was shown in a web browser.
|
String |
getNodeName()
Get the name for the current node.
|
short |
getNodeType()
Get the type of the current node.
|
protected boolean |
isTrimmedText()
Returns a flag indicating whether or not this node should
have any leading and trailing whitespace removed when asText()
is called; mostly this should be true, but must be false for
such things as text formatting tags
|
protected void |
printXml(String indent,
PrintWriter printWriter)
recursively write the XML data for the node tree starting at
node |
DomText |
splitDomText(int offset)
Split a DomText node in two.
|
DomText |
splitText(int offset)
Deprecated.
This method conflicts with the W3C DOM API since the return values are
different. Use splitDomText instead.
|
String |
toString()
Gives a simple representation to facilitate debugging
|
appendData, deleteData, getData, getLength, getNodeValue, insertData, replaceData, setData, setNodeValue, substringData
addDomChangeListener, addPropertyChangeListener, appendChild, appendDomChild, asXml, cloneDomNode, cloneNode, fireNodeAdded, fireNodeDeleted, firePropertyChange, getAllHtmlChildElements, getByXPath, getChildIterator, getChildrenAsText, getEndColumnNumber, getEndLineNumber, getEventHandler, getFirstByXPath, getFirstChild, getFirstDomChild, getLastChild, getLastDomChild, getLocalName, getLog, getNamespaceURI, getNativePage, getNextDomSibling, getNextSibling, getPage, getParentDomNode, getParentNode, getPrefix, getPreviousDomSibling, getPreviousSibling, getReadyState, getScriptObject, getStartColumnNumber, getStartLineNumber, hasAttributes, insertBefore, isAncestorOf, isRenderedVisible, notifyIncorrectness, onAddedToPage, onAllChildrenAddedToPage, printChildrenAsXml, reduceWhitespace, remove, removeAllChildren, removeDomChangeListener, removeEventHandler, removePropertyChangeListener, replace, setEventHandler, setEventHandler, setNextSibling, setParentNode, setPrefix, setPreviousSibling, setReadyState, setScriptObject
public static final String NODE_NAME
public DomText splitText(int offset)
offset
- The character position at which to split the Text node.public DomText splitDomText(int offset)
offset
- The character position at which to split the DomText node.public String asText()
public short getNodeType()
DomNode
getNodeType
in class DomNode
Node.TEXT_NODE
public String getNodeName()
DomNode
getNodeName
in class DomNode
NODE_NAME
protected void printXml(String indent, PrintWriter printWriter)
node
public String toString()
protected boolean isTrimmedText()
isTrimmedText
in class DomNode
Copyright © 2002-2012 Gargoyle Software Inc.. All Rights Reserved.