NodeTextContent Property

The textContent property of the Node interface represents the text content of the node and its descendants.

Namespace: Aspose.Html.Dom
Assembly: Aspose.HTML (in Aspose.HTML.dll) Version: 22.1
Syntax
public virtual string TextContent { get; set; }

Property Value

Type: String

A string, or null. Its value depends on the situation:

  • If the node is a document or a doctype, textContent returns null.
Note: To get all of the text and CDATA data for the whole document, use document.documentElement.textContent.
  • If the node is a CDATA section, a comment, a processing instruction, or a text node, textContent returns, or sets, the text inside the node, i.e., the Node.nodeValue.
  • For other node types, textContent returns the concatenation of the textContent of every child node, excluding comments and processing instructions.

Return Value

Type: String
Remarks

Reference:

See Also