New to Telerik UI for WPF? Start a free 30-day trial

INode

Interface

Definition

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

Assembly:Telerik.Windows.Controls.RichTextBox.dll

Syntax:

C#
public interface INode

Properties

A

       <pre><code class="lang-csharp">NamedNodeMap</code></pre>

containing the attributes of this node (if it is an

       <pre><code class="lang-csharp">Element</code></pre>

       ) or 

       <pre><code class="lang-csharp">null</code></pre>

otherwise.

C#
INamedNodeMap Attributes { get; }

A

       <pre><code class="lang-csharp">NodeList</code></pre>

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

       <pre><code class="lang-csharp">NodeList</code></pre>

containing no nodes.

C#
INodeList ChildNodes { get; }

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

       <pre><code class="lang-csharp">null</code></pre>

       .
C#
INode FirstChild { get; }

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

       <pre><code class="lang-csharp">null</code></pre>

       .
C#
INode LastChild { get; }
C#
string LocalName { get; }
C#
string NamespaceURI { get; }

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

       <pre><code class="lang-csharp">null</code></pre>

       .
C#
INode NextSibling { get; }

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

C#
string NodeName { get; }

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

C#
NodeType NodeType { get; }

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

       <pre><code class="lang-csharp">null</code></pre>

       , setting it has no effect.
C#
string NodeValue { get; set; }

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 

       <pre><code class="lang-csharp">DOMString</code></pre>

variable on the implementation platform.

The

       <pre><code class="lang-csharp">Document</code></pre>

object associated with this node. This is also the

       <pre><code class="lang-csharp">Document</code></pre>

object used to create new nodes. When this node is a

       <pre><code class="lang-csharp">Document</code></pre>

or a

csharp
DocumentType
       which is not used with any 

       <pre><code class="lang-csharp">Document</code></pre>

yet, this is

       <pre><code class="lang-csharp">null</code></pre>

       .
C#
IDocument OwnerDocument { get; }

The parent of this node. All nodes, except

       <pre><code class="lang-csharp">Attr</code></pre>

       , 

       <pre><code class="lang-csharp">Document</code></pre>

       , 

       <pre><code class="lang-csharp">DocumentFragment</code></pre>

       , 

       <pre><code class="lang-csharp">Entity</code></pre>

       , and 

       <pre><code class="lang-csharp">Notation</code></pre>

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

       <pre><code class="lang-csharp">null</code></pre>

       .
C#
INode ParentNode { get; }
C#
string Prefix { get; set; }

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

       <pre><code class="lang-csharp">null</code></pre>

       .
C#
INode PreviousSibling { get; }

Methods

Adds the node

       <pre><code class="lang-csharp">newChild</code></pre>

to the end of the list of children of this node. If the

       <pre><code class="lang-csharp">newChild</code></pre>

is already in the tree, it is first removed.

C#
INode AppendChild(INode newChild)
Parameters:newChildINodeReturns:

INode

The node added.

DomException

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

       <pre><code class="lang-csharp">newChild</code></pre>

node, or if the node to append is one of this node's ancestors.
WRONG_DOCUMENT_ERR: Raised if

       <pre><code class="lang-csharp">newChild</code></pre>

was created from a different document than the one that created this node.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.

C#
INode CloneNode(bool deep)
Parameters:deepboolReturns:

INode

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

C#
bool HasAttributes()

bool

csharp
true

if this node has any attributes,

       <pre><code class="lang-csharp">false</code></pre>

otherwise.

Returns whether this node has any children.

C#
bool HasChildNodes()

bool

csharp
true

if this node has any children,

       <pre><code class="lang-csharp">false</code></pre>

otherwise.

Inserts the node

       <pre><code class="lang-csharp">newChild</code></pre>

before the existing child node

       <pre><code class="lang-csharp">refChild</code></pre>

       . If 

       <pre><code class="lang-csharp">refChild</code></pre>

is

csharp
null

, insert

       <pre><code class="lang-csharp">newChild</code></pre>

at the end of the list of children.
If

       <pre><code class="lang-csharp">newChild</code></pre>

is a

csharp
DocumentFragment

object, all of its children are inserted, in the same order, before

       <pre><code class="lang-csharp">refChild</code></pre>

       . If the 

       <pre><code class="lang-csharp">newChild</code></pre>

is already in the tree, it is first removed.

C#
INode InsertBefore(INode newChild, INode refChild)
Parameters:newChildINoderefChildINodeReturns:

INode

The node being inserted.

DomException

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

       <pre><code class="lang-csharp">newChild</code></pre>

node, or if the node to insert is one of this node's ancestors.
WRONG_DOCUMENT_ERR: Raised if

       <pre><code class="lang-csharp">newChild</code></pre>

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

       <pre><code class="lang-csharp">refChild</code></pre>

is not a child of this node.

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

C#
bool IsSupported(string feature, string version)
Parameters:featurestringversionstring

bool

Returns

       <pre><code class="lang-csharp">true</code></pre>

if the specified feature is supported on this node,

       <pre><code class="lang-csharp">false</code></pre>

otherwise.

Puts all

       <pre><code class="lang-csharp">Text</code></pre>

nodes in the full depth of the sub-tree underneath this

       <pre><code class="lang-csharp">Node</code></pre>

       , including attribute nodes, into a 
       "normal" form where only structure (e.g., elements, comments, 
       processing instructions, CDATA sections, and entity references) 
       separates 

       <pre><code class="lang-csharp">Text</code></pre>

nodes, i.e., there are neither adjacent

       <pre><code class="lang-csharp">Text</code></pre>

nodes nor empty

csharp
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

       <pre><code class="lang-csharp">CDATASections</code></pre>

       , the normalize operation alone may not be 
       sufficient, since XPointers do not differentiate between 

       <pre><code class="lang-csharp">Text</code></pre>

nodes and

csharp
CDATASection

nodes.

C#
void Normalize()

Removes the child node indicated by

       <pre><code class="lang-csharp">oldChild</code></pre>

from the list of children, and returns it.

C#
INode RemoveChild(INode oldChild)
Parameters:oldChildINodeReturns:

INode

The node removed.

DomException

       NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
       <br />NOT_FOUND_ERR: Raised if 

       <pre><code class="lang-csharp">oldChild</code></pre>

is not a child of this node.

C#
INode ReplaceChild(INode newChild, INode oldChild)
Parameters:newChildINodeoldChildINodeReturns:

INode