Class Text
java.lang.Object
jodd.lagarto.dom.Node
jodd.lagarto.dom.Text
- All Implemented Interfaces:
Cloneable
Text node. Text value is stored as node value in decoded, readable form.
There is also an option to get and set html content in
raw, html form.
-
Nested Class Summary
Nested classes/interfaces inherited from class Node
Node.NodeType -
Field Summary
FieldsFields inherited from class Node
attributes, childElementNodes, childElementNodesCount, childNodes, nodeName, nodeRawName, nodeType, nodeValue, ownerDocument, parentNode, siblingElementIndex, siblingIndex, siblingNameIndex -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Returns encoded HTML text.booleanisBlank()Returnstrueif text content is blank.voidsetNodeValue(String value) Sets the plain text as node value.voidsetTextValue(String text) Sets HTML text, but decodes it first.protected voidvisitNode(NodeVisitor nodeVisitor) Visits single node.Methods inherited from class Node
addChild, addChild, appendTextContent, changeOwnerDocument, check, cloneTo, detachFromParent, filterChildNodes, findChildNodeWithName, getAttribute, getAttribute, getAttributeInstance, getAttributesCount, getChild, getChild, getChildElement, getChildElements, getChildElementsCount, getChildElementsCount, getChildNodes, getChildNodesCount, getCssPath, getFirstChild, getFirstChildElement, getFirstChildElement, getHtml, getInnerHtml, getLastChild, getLastChildElement, getLastChildElement, getNextSibling, getNextSiblingElement, getNextSiblingName, getNodeName, getNodeRawName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPreviousSibling, getPreviousSiblingElement, getPreviousSiblingName, getSiblingElementIndex, getSiblingIndex, getSiblingNameIndex, getTextContent, hasAttribute, hasAttributes, hasChildNodes, indexOfAttributeInstance, initAttributes, initChildElementNodes, initChildNodes, initSiblingNames, insertAfter, insertAfter, insertBefore, insertBefore, insertChild, insertChild, isAttributeContaining, reindexChildren, reindexChildrenOnAdd, removeAllChilds, removeAttribute, removeChild, removeChild, setAttribute, setAttribute, visit, visitChildren
-
Field Details
-
encodedText
-
blank
-
-
Constructor Details
-
Text
-
-
Method Details
-
clone
-
isBlank
public boolean isBlank()Returnstrueif text content is blank. -
setNodeValue
Sets the plain text as node value.- Overrides:
setNodeValuein classNode
-
setTextValue
Sets HTML text, but decodes it first. -
getTextValue
Returns encoded HTML text. -
visitNode
Description copied from class:NodeVisits single node. Implementations just needs to call the correct visitor callback function.
-