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
<pre><code class="lang-csharp">DocumentType</code></pre>
)
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.
<pre><code class="lang-csharp">docType</code></pre>
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
<pre><code class="lang-csharp">DOMImplementation</code></pre>
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
<pre><code class="lang-csharp">Attr</code></pre>
object with the following attributes: AttributeValue
<pre><code class="lang-csharp">Node.nodeName</code></pre>
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
<pre><code class="lang-csharp">null</code></pre>
if there is no prefix
<pre><code class="lang-csharp">Node.localName</code></pre>
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
<pre><code class="lang-csharp">qualifiedName</code></pre>
is malformed, if the
<pre><code class="lang-csharp">qualifiedName</code></pre>
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
<pre><code class="lang-csharp">CDATASection</code></pre>
node whose value is the specified string.
ICdataSection CreateCdataSection(string data)
The new
<pre><code class="lang-csharp">CDATASection</code></pre>
object.
Exceptions: DomExceptionNOT_SUPPORTED_ERR: Raised if this document is an HTML document.
Creates an empty
<pre><code class="lang-csharp">DocumentFragment</code></pre>
object.
IDocumentFragment CreateDocumentFragment()
A new
<pre><code class="lang-csharp">DocumentFragment</code></pre>
.
Creates an
<pre><code class="lang-csharp">EntityReference</code></pre>
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
<pre><code class="lang-csharp">Entity</code></pre>
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
<pre><code class="lang-csharp">EntityReference</code></pre>
node is also unbound; (its
<pre><code class="lang-csharp">namespaceURI</code></pre>
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
<pre><code class="lang-csharp">EntityReference</code></pre>
object.
Exceptions: DomExceptionINVALID_CHARACTER_ERR: Raised if the specified name contains an
illegal character.
NOT_SUPPORTED_ERR: Raised if this document is an HTML document.
Creates a
<pre><code class="lang-csharp">ProcessingInstruction</code></pre>
node given the specified name and data strings.
IProcessingInstruction CreateProcessingInstruction(string target, string data)
The new
<pre><code class="lang-csharp">ProcessingInstruction</code></pre>
object.
Exceptions: DomExceptionINVALID_CHARACTER_ERR: Raised if the specified target contains an
illegal character.
NOT_SUPPORTED_ERR: Raised if this document is an HTML document.
Returns the
<pre><code class="lang-csharp">Element</code></pre>
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
<pre><code class="lang-csharp">ID</code></pre>
. 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
<pre><code class="lang-csharp">null</code></pre>
.
Returns a
<pre><code class="lang-csharp">NodeList</code></pre>
of all the
Elements
with a given tag name in the order in which they are encountered in a preorder traversal of the
<pre><code class="lang-csharp">Document</code></pre>
tree.
Returns a
<pre><code class="lang-csharp">NodeList</code></pre>
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
<pre><code class="lang-csharp">Document</code></pre>
tree.