Show / Hide Table of Contents

Class TextNode

A text node.

Inheritance
System.Object
Node
TextNode
Inherited Members
Node.BaseUri
Node.ChildNode(Int32)
Node.ChildNodes
Node.ChildNodesCopy()
Node.ChildNodeSize
Node.Parent
Node.OwnerDocument
Node.Remove()
Node.Before(String)
Node.Before(Node)
Node.After(String)
Node.After(Node)
Node.Wrap(String)
Node.Unwrap()
Node.ReplaceWith(Node)
Node.SiblingNodes
Node.NextSibling
Node.PreviousSibling
Node.SiblingIndex
Node.OuterHtml
Node.Equals(Object)
Node.GetHashCode()
Namespace: Supremes.Nodes
Assembly: Supremes.dll
Syntax
public sealed class TextNode : Node

Properties

Attributes

Get all of the element's attributes.

Declaration
public override Attributes Attributes { get; }
Property Value
Type Description
Attributes
Overrides
Node.Attributes

IsBlank

Test if this text node is blank -- that is, empty or only whitespace (including newlines).

Declaration
public bool IsBlank { get; }
Property Value
Type Description
System.Boolean

true if this document is empty or only whitespace, false if it contains any text content.

Text

Get or Set text content of this text node.

Declaration
public string Text { get; set; }
Property Value
Type Description
System.String

unencoded text

Remarks

if you want to use fluent API, write using Supremes.Fluent;.

See Also
WholeText
FluentUtility

WholeText

Get the (unencoded) text of this text node, including any newlines and spaces present in the original.

Declaration
public string WholeText { get; }
Property Value
Type Description
System.String

text

Methods

AbsUrl(String)

Get an absolute URL from a URL attribute that may be relative.

Declaration
public override string AbsUrl(string attributeKey)
Parameters
Type Name Description
System.String attributeKey

The attribute key

Returns
Type Description
System.String
Overrides
Node.AbsUrl(String)

Attr(String)

Get an attribute's value by its key.

Declaration
public override string Attr(string attributeKey)
Parameters
Type Name Description
System.String attributeKey
Returns
Type Description
System.String
Overrides
Node.Attr(String)

Attr(String, String)

Set an attribute (key=value).

Declaration
public override Node Attr(string attributeKey, string attributeValue)
Parameters
Type Name Description
System.String attributeKey
System.String attributeValue
Returns
Type Description
Node
Overrides
Node.Attr(String, String)

HasAttr(String)

Test if this element has an attribute.

Declaration
public override bool HasAttr(string attributeKey)
Parameters
Type Name Description
System.String attributeKey
Returns
Type Description
System.Boolean
Overrides
Node.HasAttr(String)

RemoveAttr(String)

Remove an attribute from this element.

Declaration
public override Node RemoveAttr(string attributeKey)
Parameters
Type Name Description
System.String attributeKey
Returns
Type Description
Node
Overrides
Node.RemoveAttr(String)

ToString()

Converts the value of this instance to a string.

Declaration
public override string ToString()
Returns
Type Description
System.String
Overrides
Node.ToString()

Extension Methods

FluentUtility.Text(TextNode, String)
Back to top Generated by DocFX