Interface IElement
Inherited Members
Namespace: Telerik.Windows.Documents.FormatProviders.Html.Parsing.Dom
Assembly: Telerik.Windows.Controls.RichTextBox.dll
Syntax
public interface IElement : INode
Properties
TagName
The name of the element. For example, in:
<elementExample id="demo"> ... </elementExample> ,
tagName
has
the value
"elementExample"
. Note that this is
case-preserving in XML, as are all of the operations of the DOM. The
HTML DOM returns the tagName
of an HTML element in the
canonical uppercase form, regardless of the case in the source HTML
document.
Declaration
string TagName { get; }
Property Value
System.String
|
Methods
GetAttribute(String)
Retrieves an attribute value by name.
Declaration
string GetAttribute(string name)
Parameters
System.String
name
|
Returns
System.String
The value as a string, or the empty string
if that attribute does not have a specified or default value.
|
GetAttributeNode(String)
GetAttributeNodeNS(String, String)
Retrieves an
Attr
node by local name and namespace URI.
HTML-only DOM implementations do not need to implement this method.
Declaration
IAttr GetAttributeNodeNS(string namespaceUri, string localName)
Parameters
System.String
namespaceUri
|
System.String
localName
|
Returns
IAttr
The node with the specified attribute local
name and namespace URI or if there is no such
attribute.
|
GetAttributeNS(String, String)
Retrieves an attribute value by local name and namespace URI. HTML-only DOM implementations do not need to implement this method.
Declaration
string GetAttributeNS(string namespaceUri, string localName)
Parameters
System.String
namespaceUri
|
System.String
localName
|
Returns
System.String
The value as a string, or the empty string
if that attribute does not have a specified or default value.
|
GetElementsByTagName(String)
Returns a
NodeList
of all descendant Elements
with a given tag name, in the order in which they are encountered in
a preorder traversal of this Element
tree.
Declaration
INodeList GetElementsByTagName(string name)
Parameters
System.String
name
|
Returns
INodeList
A list of matching nodes.
|
GetElementsByTagNameNS(String, String)
Returns a
NodeList
of all the descendant
Elements
with a given local name and namespace URI in
the order in which they are encountered in a preorder traversal of this
Element
tree.
HTML-only DOM implementations do not need to implement this method.
Declaration
INodeList GetElementsByTagNameNS(string namespaceUri, string localName)
Parameters
System.String
namespaceUri
|
System.String
localName
|
Returns
INodeList
A new object containing all the matched
.
|
HasAttribute(String)
Returns
true
when an attribute with a given name is
specified on this element or has a default value, false
otherwise.
Declaration
bool HasAttribute(string name)
Parameters
System.String
name
|
Returns
System.Boolean
if an attribute with the given name is
|
HasAttributeNS(String, String)
Returns
true
when an attribute with a given local name and
namespace URI is specified on this element or has a default value,
false
otherwise. HTML-only DOM implementations do not
need to implement this method.
Declaration
bool HasAttributeNS(string namespaceUri, string localName)
Parameters
System.String
namespaceUri
|
System.String
localName
|
Returns
System.Boolean
if an attribute with the given local name
|
RemoveAttribute(String)
Declaration
void RemoveAttribute(string name)
Parameters
System.String
name
|
RemoveAttributeNode(IAttr)
Removes the specified attribute node. If the removed
Attr
has a default value it is immediately replaced. The replacing
attribute has the same namespace URI and local name, as well as the
original prefix, when applicable.
Declaration
IAttr RemoveAttributeNode(IAttr oldAttr)
Parameters
IAttr
oldAttr
|
Returns
IAttr
The node that was removed.
|
Exceptions
DomException
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
is not an attribute
of the element.
|
RemoveAttributeNS(String, String)
Declaration
void RemoveAttributeNS(string namespaceUri, string localName)
Parameters
System.String
namespaceUri
|
System.String
localName
|
SetAttribute(String, String)
Declaration
void SetAttribute(string name, string value)
Parameters
System.String
name
|
System.String
value
|
SetAttributeNode(IAttr)
SetAttributeNodeNS(IAttr)
SetAttributeNS(String, String, String)
Declaration
void SetAttributeNS(string namespaceUri, string qualifiedName, string value)
Parameters
System.String
namespaceUri
|
System.String
qualifiedName
|
System.String
value
|