Class TextNode
A text node.
Inherited Members
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
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
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
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
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
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
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
ToString()
Converts the value of this instance to a string.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |