Interface
INode

Definition

Namespace:Telerik.Windows.Documents.FormatProviders.Html.Parsing.Dom

Assembly:Telerik.Windows.Controls.RichTextBox.dll

Syntax:

cs-api-definition
public interface INode

Properties

Attributes

A

NamedNodeMap
containing the attributes of this node (if it is an
Element
) or
null
otherwise.

Declaration

cs-api-definition
INamedNodeMap Attributes { get; }

Property Value

INamedNodeMap

ChildNodes

A

NodeList
that contains all children of this node. If there are no children, this is a
NodeList
containing no nodes.

Declaration

cs-api-definition
INodeList ChildNodes { get; }

Property Value

INodeList

FirstChild

The first child of this node. If there is no such node, this returns

null
.

Declaration

cs-api-definition
INode FirstChild { get; }

Property Value

INode

LastChild

The last child of this node. If there is no such node, this returns

null
.

Declaration

cs-api-definition
INode LastChild { get; }

Property Value

INode

LocalName

Declaration

cs-api-definition
string LocalName { get; }

Property Value

string

NamespaceURI

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "URI")]
string NamespaceURI { get; }

Property Value

string

NextSibling

The node immediately following this node. If there is no such node, this returns

null
.

Declaration

cs-api-definition
INode NextSibling { get; }

Property Value

INode

NodeName

The name of this node, depending on its type; see the table above.

Declaration

cs-api-definition
string NodeName { get; }

Property Value

string

NodeType

A code representing the type of the underlying object, as defined above.

Declaration

cs-api-definition
NodeType NodeType { get; }

Property Value

NodeType

NodeValue

The value of this node, depending on its type; see the table above. When it is defined to be

null
, setting it has no effect.

Declaration

cs-api-definition
string NodeValue { get; set; }

Property Value

string

Exceptions

DomException

NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.

DomException

DOMSTRING_SIZE_ERR: Raised when it would return more characters than fit in a

DOMString
variable on the implementation platform.

OwnerDocument

The

Document
object associated with this node. This is also the
Document
object used to create new nodes. When this node is a
Document
or a
DocumentType
which is not used with any
Document
yet, this is
null
.

Declaration

cs-api-definition
IDocument OwnerDocument { get; }

Property Value

IDocument

ParentNode

The parent of this node. All nodes, except

Attr
,
Document
,
DocumentFragment
,
Entity
, and
Notation
may have a parent. However, if a node has just been created and not yet added to the tree, or if it has been removed from the tree, this is
null
.

Declaration

cs-api-definition
INode ParentNode { get; }

Property Value

INode

Prefix

Declaration

cs-api-definition
string Prefix { get; set; }

Property Value

string

PreviousSibling

The node immediately preceding this node. If there is no such node, this returns

null
.

Declaration

cs-api-definition
INode PreviousSibling { get; }

Property Value

INode

Methods

AppendChild(INode)

Adds the node

newChild
to the end of the list of children of this node. If the
newChild
is already in the tree, it is first removed.

Declaration

cs-api-definition
INode AppendChild(INode newChild)

Parameters

newChild

INode

Returns

INode

The node added.

Exceptions

DomException

HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not allow children of the type of the

newChild
node, or if the node to append is one of this node's ancestors.
WRONG_DOCUMENT_ERR: Raised if
newChild
was created from a different document than the one that created this node.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.

CloneNode(bool)

Declaration

cs-api-definition
INode CloneNode(bool deep)

Parameters

deep

bool

Returns

INode

HasAttributes()

Returns whether this node (if it is an element) has any attributes.

Declaration

cs-api-definition
bool HasAttributes()

Returns

bool

true
if this node has any attributes,
       <pre><code class="lang-csharp">false</code></pre> otherwise.

HasChildNodes()

Returns whether this node has any children.

Declaration

cs-api-definition
bool HasChildNodes()

Returns

bool

true
if this node has any children,
      <pre><code class="lang-csharp">false</code></pre> otherwise.

InsertBefore(INode, INode)

Inserts the node

newChild
before the existing child node
refChild
. If
refChild
is
null
, insert
newChild
at the end of the list of children.
If
newChild
is a
DocumentFragment
object, all of its children are inserted, in the same order, before
refChild
. If the
newChild
is already in the tree, it is first removed.

Declaration

cs-api-definition
INode InsertBefore(INode newChild, INode refChild)

Parameters

newChild

INode

refChild

INode

Returns

INode

The node being inserted.

Exceptions

DomException

HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not allow children of the type of the

newChild
node, or if the node to insert is one of this node's ancestors.
WRONG_DOCUMENT_ERR: Raised if
newChild
was created from a different document than the one that created this node.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly or if the parent of the node being inserted is readonly.
NOT_FOUND_ERR: Raised if
refChild
is not a child of this node.

IsSupported(string, string)

Tests whether the DOM implementation implements a specific feature and that feature is supported by this node.

Declaration

cs-api-definition
bool IsSupported(string feature, string version)

Parameters

feature

string

version

string

Returns

bool

Returns

true
if the specified feature is supported on this node,
false
otherwise.

Normalize()

Puts all

Text
nodes in the full depth of the sub-tree underneath this
Node
, including attribute nodes, into a "normal" form where only structure (e.g., elements, comments, processing instructions, CDATA sections, and entity references) separates
Text
nodes, i.e., there are neither adjacent
Text
nodes nor empty
Text
nodes. This can be used to ensure that the DOM view of a document is the same as if it were saved and re-loaded, and is useful when operations (such as XPointer lookups) that depend on a particular document tree structure are to be used.In cases where the document contains
CDATASections
, the normalize operation alone may not be sufficient, since XPointers do not differentiate between
Text
nodes and
CDATASection
nodes.

Declaration

cs-api-definition
void Normalize()

RemoveChild(INode)

Removes the child node indicated by

oldChild
from the list of children, and returns it.

Declaration

cs-api-definition
INode RemoveChild(INode oldChild)

Parameters

oldChild

INode

Returns

INode

The node removed.

Exceptions

DomException

NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
NOT_FOUND_ERR: Raised if

oldChild
is not a child of this node.

ReplaceChild(INode, INode)

Declaration

cs-api-definition
INode ReplaceChild(INode newChild, INode oldChild)

Parameters

newChild

INode

oldChild

INode

Returns

INode