Class CharacterData

Class CharacterData

Namespace: Aspose.Html.Dom
Assembly: Aspose.HTML.dll (25.2.0)

The CharacterData extends Node with a set of attributes and methods for accessing character data in the DOM.

[ComVisible(true)]
[DOMName("CharacterData")]
[DOMObject]
public abstract class CharacterData : Node, INotifyPropertyChanged, IEventTarget, IDisposable, IXPathNSResolver

Inheritance

objectDOMObjectEventTargetNodeCharacterData

Derived

Comment, ProcessingInstruction, Text

Implements

INotifyPropertyChanged, IEventTarget, IDisposable, IXPathNSResolver

Inherited Members

Node.ELEMENT_NODE, Node.ATTRIBUTE_NODE, Node.TEXT_NODE, Node.CDATA_SECTION_NODE, Node.ENTITY_REFERENCE_NODE, Node.ENTITY_NODE, Node.PROCESSING_INSTRUCTION_NODE, Node.COMMENT_NODE, Node.DOCUMENT_NODE, Node.DOCUMENT_TYPE_NODE, Node.DOCUMENT_FRAGMENT_NODE, Node.NOTATION_NODE, Node.HasChildNodes(), Node.Normalize(), Node.CloneNode(), Node.CloneNode(bool), Node.IsEqualNode(Node), Node.IsSameNode(Node), Node.LookupPrefix(string), Node.LookupNamespaceURI(string), Node.IsDefaultNamespace(string), Node.InsertBefore(Node, Node), Node.ReplaceChild(Node, Node), Node.RemoveChild(Node), Node.AppendChild(Node), Node.Dispose(bool), Node.ToString(), Node.NodeType, Node.LocalName, Node.NamespaceURI, Node.Prefix, Node.NodeName, Node.BaseURI, Node.OwnerDocument, Node.ParentNode, Node.ParentElement, Node.ChildNodes, Node.FirstChild, Node.LastChild, Node.PreviousSibling, Node.NextSibling, Node.NodeValue, Node.TextContent, EventTarget.AddEventListener(string, DOMEventHandler, bool), EventTarget.AddEventListener(string, IEventListener), EventTarget.AddEventListener(string, IEventListener, bool), EventTarget.RemoveEventListener(string, DOMEventHandler, bool), EventTarget.RemoveEventListener(string, IEventListener), EventTarget.RemoveEventListener(string, IEventListener, bool), EventTarget.DispatchEvent(Event), EventTarget.Dispose(), EventTarget.Dispose(bool), DOMObject.GetPlatformType(), object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Constructors

CharacterData(string, Document)

Initializes a new instance of the Aspose.Html.Dom.CharacterData class.

protected CharacterData(string data, Document doc)

Parameters

data string

The character data.

doc Document

The document.

Properties

Data

The character data of the node that implements this interface.

[DOMTreatNullAs(typeof(string), "")]
[DOMName("data")]
public virtual string Data { get; set; }

Property Value

string

Length

The number of 16-bit units that are available through data and the substringData method below. This may have the value zero, i.e., CharacterData nodes may be empty.

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

Property Value

int

Methods

AppendData(string)

Append the string to the end of the character data of the node.

[DOMName("appendData")]
public virtual void AppendData(string data)

Parameters

data string

The content data.

DeleteData(int, int)

Remove a range of 16-bit units from the node.

[DOMName("deleteData")]
public virtual void DeleteData(int offset, int count)

Parameters

offset int

The offset.

count int

The count.

InsertData(int, string)

Insert a string at the specified 16-bit unit offset.

[DOMName("insertData")]
public virtual void InsertData(int offset, string data)

Parameters

offset int

The offset.

data string

The content data.

ReplaceData(int, int, string)

Replace the characters starting at the specified 16-bit unit offset with the specified string.

[DOMName("replaceData")]
public virtual void ReplaceData(int offset, int count, string data)

Parameters

offset int

The offset.

count int

The count.

data string

The content data.

SubstringData(int, int)

Extracts a range of data from the node.

[DOMName("substringData")]
public virtual string SubstringData(int offset, int count)

Parameters

offset int

The offset.

count int

The count.

Returns

string

The text data

ToString()

Returns a System.String that represents this instance.

public override string ToString()

Returns

string

A System.String that represents this instance.