IDocument
Definition
Namespace:Telerik.Windows.Documents.FormatProviders.Html.Parsing.Dom
Assembly:Telerik.Windows.Controls.RichTextBox.dll
Syntax:
public interface IDocument : INode
Inherited Members
Properties
The Document Type Declaration (see
DocumentType
) associated with this document. For HTML documents as well as XML documents without a document type declaration this returns
<pre><code class="lang-csharp">null</code></pre>
. The DOM Level 2 does not support editing the Document Type Declaration.
docType
cannot be altered in any way, including through the use of methods inherited from the
<pre><code class="lang-csharp">Node</code></pre>
interface, such as
insertNode
or
<pre><code class="lang-csharp">removeNode</code></pre>
.
IDocumentType Doctype { get; }
This is a convenience attribute that allows direct access to the child node that is the root element of the document. For HTML documents, this is the element with the tagName "HTML".
IElement DocumentElement { get; }
The
DOMImplementation
object that handles this document. A DOM application may use objects from multiple implementations.
IDomImplementation Implementation { get; }
Methods
Creates an attribute of the given qualified name and namespace URI. HTML-only DOM implementations do not need to implement this method.
IAttr CreateAttributeNS(string namespaceUri, string qualifiedName)
A new
Attr
object with the following attributes: AttributeValue
Node.nodeName
qualifiedName
<pre><code class="lang-csharp">Node.namespaceURI</code></pre><pre><code class="lang-csharp">namespaceURI</code></pre>
<pre><code class="lang-csharp">Node.prefix</code></pre>
prefix, extracted from
<pre><code class="lang-csharp">qualifiedName</code></pre>
, or
null
if there is no prefix
Node.localName
local name, extracted from
<pre><code class="lang-csharp">qualifiedName</code></pre><pre><code class="lang-csharp">Attr.name</code></pre>
<pre><code class="lang-csharp">qualifiedName</code></pre><pre><code class="lang-csharp">Node.nodeValue</code></pre>
the empty string
INVALID_CHARACTER_ERR: Raised if the specified qualified name
contains an illegal character.
<br />NAMESPACE_ERR: Raised if the
qualifiedName
is malformed, if the
qualifiedName
has a prefix and the
<pre><code class="lang-csharp">namespaceURI</code></pre>
is
null
, if the
<pre><code class="lang-csharp">qualifiedName</code></pre>
has a prefix that is "xml" and the
<pre><code class="lang-csharp">namespaceURI</code></pre>
is different from " http://www.w3.org/XML/1998/namespace", or if the
<pre><code class="lang-csharp">qualifiedName</code></pre>
is "xmlns" and the
<pre><code class="lang-csharp">namespaceURI</code></pre>
is different from " http://www.w3.org/2000/xmlns/".
Creates a
CDATASection
node whose value is the specified string.
ICdataSection CreateCdataSection(string data)
The new
CDATASection
object.
Exceptions:NOT_SUPPORTED_ERR: Raised if this document is an HTML document.
Creates an empty
DocumentFragment
object.
IDocumentFragment CreateDocumentFragment()
A new
DocumentFragment
.
Creates an
EntityReference
object. In addition, if the referenced entity is known, the child list of the
<pre><code class="lang-csharp">EntityReference</code></pre>
node is made the same as that of the corresponding
Entity
node.If any descendant of the
<pre><code class="lang-csharp">Entity</code></pre>
node has an unbound namespace prefix, the corresponding descendant of the created
EntityReference
node is also unbound; (its
namespaceURI
is
<pre><code class="lang-csharp">null</code></pre>
). The DOM Level 2 does not support any mechanism to resolve namespace prefixes.
IEntityReference CreateEntityReference(string name)
The new
EntityReference
object.
Exceptions:INVALID_CHARACTER_ERR: Raised if the specified name contains an
illegal character.
NOT_SUPPORTED_ERR: Raised if this document is an HTML document.
Creates a
ProcessingInstruction
node given the specified name and data strings.
IProcessingInstruction CreateProcessingInstruction(string target, string data)
The new
ProcessingInstruction
object.
Exceptions:INVALID_CHARACTER_ERR: Raised if the specified target contains an
illegal character.
NOT_SUPPORTED_ERR: Raised if this document is an HTML document.
Returns the
Element
whose
ID
is given by
<pre><code class="lang-csharp">elementId</code></pre>
. If no such element exists, returns
<pre><code class="lang-csharp">null</code></pre>
. Behavior is not defined if more than one element has this
ID
. The DOM implementation must have information that says which attributes are of type ID. Attributes with the name "ID" are not of type ID unless so defined. Implementations that do not know whether attributes are of type ID or not are expected to return
null
.
Returns a
NodeList
of all the
Elements
with a given tag name in the order in which they are encountered in a preorder traversal of the
Document
tree.
Returns a
NodeList
of all the
Elements
with a given local name and namespace URI in the order in which they are encountered in a preorder traversal of the
Document
tree.