📅  最后修改于: 2020-11-10 05:05:27             🧑  作者: Mango
作为API的DOM包含表示可以在XML文档中找到的不同类型信息的接口,例如元素和文本。这些接口包括使用这些对象所需的方法和属性。属性定义节点的特征,而方法则提供了操作节点的方法。
下表列出了DOM类和接口-
S.No. | Interface & Description |
---|---|
1 |
DOMImplementation It provides a number of methods for performing operations that are independent of any particular instance of the document object model. |
2 |
DocumentFragment It is the “lightweight” or “minimal” document object, and it (as the superclass of Document) anchors the XML/HTML tree in a full-fledged document. |
3 |
Document It represents the XML document’s top-level node, which provides access to all the nodes in the document, including the root element. |
4 |
Node It represents XML node. |
5 |
NodeList It represents a read-only list of Node objects. |
6 |
NamedNodeMap It represents collections of nodes that can be accessed by name. |
7 |
Data It extends Node with a set of attributes and methods for accessing character data in the DOM. |
8 |
Attribute It represents an attribute in an Element object. |
9 |
Element It represents the element node. Derives from Node. |
10 |
Text It represents the text node. Derives from CharacterData. |
11 |
Comment It represents the comment node. Derives from CharacterData. |
12 |
ProcessingInstruction It represents a “processing instruction”. It is used in XML as a way to keep processor-specific information in the text of the document. |
13 |
CDATA Section It represents the CDATA Section. Derives from Text. |
14 |
Entity It represents an entity. Derives from Node. |
15 |
EntityReference This represent an entity reference in the tree. Derives from Node. |
我们将在各自的章节中讨论上述每个接口的方法和属性。