Table of Contents

Interface ICharacterData

Namespace
AngleSharp.Dom
Assembly
AngleSharp.dll

The CharacterData abstract interface represents a Node object that contains characters.

[DomName("CharacterData")]
public interface ICharacterData : INode, IEventTarget, IMarkupFormattable, IChildNode, INonDocumentTypeChildNode
Inherited Members
Extension Methods

Properties

Data

Gets or sets the contained text.

[DomName("data")]
string Data { get; set; }

Property Value

string

Length

Gets the length of the contained text.

[DomName("length")]
int Length { get; }

Property Value

int

Methods

Append(string)

Appends the given value to the Data string.

[DomName("appendData")]
void Append(string value)

Parameters

value string

The text to append.

Delete(int, int)

Removes the specified amount of characters, starting at the specified offset, from the Data.

[DomName("deleteData")]
void Delete(int offset, int count)

Parameters

offset int

The offset, where the removal should begin.

count int

The number of characters to remove.

Insert(int, string)

Inserts the specified characters, at the specified offset, in the Data text.

[DomName("insertData")]
void Insert(int offset, string value)

Parameters

offset int

The offset where to insert the text.

value string

The text to insert.

Replace(int, int, string)

Replaces the specified amount of characters, starting at the specified offset, with the specified value.

[DomName("replaceData")]
void Replace(int offset, int count, string value)

Parameters

offset int

The offset, where the text should be inserted.

count int

The amount of characters that should be overwritten.

value string

The value to insert.

Substring(int, int)

Returns a string containing the part of Data of the specified length and starting at the specified offset.

[DomName("substringData")]
string Substring(int offset, int count)

Parameters

offset int

The point where to start.

count int

The numbers of characters to copy.

Returns

string

A string that contains a subset of the characters of Data.