InterfaceINode
Definition
Namespace:Telerik.Windows.Documents.FormatProviders.Html.Parsing.Dom
Assembly:Telerik.Windows.Controls.RichTextBox.dll
Syntax:
public interface INode
Properties
Attributes
A
NamedNodeMap containing the attributes of this node (if
it is an Element) or null otherwise.ChildNodes
A
NodeList that contains all children of this node. If
there are no children, this is a NodeList containing no
nodes.FirstChild
The first child of this node. If there is no such node, this returns
null.LastChild
The last child of this node. If there is no such node, this returns
null.NamespaceURI
Declaration
[SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "URI")]
string NamespaceURI { get; }
Property Value
NextSibling
The node immediately following this node. If there is no such node, this returns
null.NodeName
The name of this node, depending on its type; see the table above.
NodeType
A code representing the type of the underlying object, as defined above.
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
string NodeValue { get; set; }
Property Value
Exceptions
NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
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.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.PreviousSibling
The node immediately preceding this node. If there is no such node, this returns
null.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
INode AppendChild(INode newChild)
Parameters
newChild
Returns
The node added.
Exceptions
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.
HasAttributes()
Returns whether this node (if it is an element) has any attributes.
Declaration
bool HasAttributes()
Returns
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
bool HasChildNodes()
Returns
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
INode InsertBefore(INode newChild, INode refChild)
Parameters
newChild
refChild
Returns
The node being inserted.
Exceptions
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.
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
void Normalize()
RemoveChild(INode)
Removes the child node indicated by
oldChild from the list
of children, and returns it.Declaration
INode RemoveChild(INode oldChild)
Parameters
oldChild
Returns
The node removed.
Exceptions
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
NOT_FOUND_ERR: Raised if
oldChild is not a child of
this node.