Interface INode
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.
Declaration
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
INodeList ChildNodes { get; }
Property Value
INodeList
|
FirstChild
The first child of this node. If there is no such node, this returns
null
.
Declaration
INode FirstChild { get; }
Property Value
INode
|
LastChild
The last child of this node. If there is no such node, this returns
null
.
Declaration
INode LastChild { get; }
Property Value
INode
|
LocalName
Declaration
string LocalName { get; }
Property Value
System.String
|
NamespaceURI
Declaration
string NamespaceURI { get; }
Property Value
System.String
|
NextSibling
The node immediately following this node. If there is no such node, this returns
null
.
Declaration
INode NextSibling { get; }
Property Value
INode
|
NodeName
The name of this node, depending on its type; see the table above.
Declaration
string NodeName { get; }
Property Value
System.String
|
NodeType
A code representing the type of the underlying object, as defined above.
Declaration
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
string NodeValue { get; set; }
Property Value
System.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 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
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
INode ParentNode { get; }
Property Value
INode
|
Prefix
Declaration
string Prefix { get; set; }
Property Value
System.String
|
PreviousSibling
The node immediately preceding this node. If there is no such node, this returns
null
.
Declaration
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
INode AppendChild(INode newChild)
Parameters
INode
newChild
|
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 node, or if
the node to append is one of this node's ancestors.
WRONG_DOCUMENT_ERR: Raised if was created
from a different document than the one that created this node.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. |
CloneNode(Boolean)
HasAttributes()
Returns whether this node (if it is an element) has any attributes.
Declaration
bool HasAttributes()
Returns
System.Boolean
if this node has any attributes,
otherwise.
|
HasChildNodes()
Returns whether this node has any children.
Declaration
bool HasChildNodes()
Returns
System.Boolean
if this node has any children,
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
INode
newChild
|
INode
refChild
|
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 node, or if
the node to insert is one of this node's ancestors.
WRONG_DOCUMENT_ERR: Raised if 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 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
bool IsSupported(string feature, string version)
Parameters
System.String
feature
|
System.String
version
|
Returns
System.Boolean
Returns if the specified feature is
supported on this node, 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
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
INode
oldChild
|
Returns
INode
The node removed. |
Exceptions
DomException
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
is not a child of
this node.
|
ReplaceChild(INode, INode)
Declaration
INode ReplaceChild(INode newChild, INode oldChild)
Parameters
INode
newChild
|
INode
oldChild
|
Returns
INode
|