Dom 简明教程
XML DOM - Nodes
在本章中,我们将学习 XML DOM 节点。每个 XML DOM 在称为节点的分层单元中包含信息,而 DOM 描述了这些节点及其关系。
In this chapter, we will study about the XML DOM Nodes. Every XML DOM contains the information in hierarchical units called Nodes and the DOM describes these nodes and the relationship between them.
Node Types
以下流程图显示了所有节点类型 −
The following flowchart shows all the node types −
XML 中最常见的节点类型是 −
The most common types of nodes in XML are −
-
Document Node − Complete XML document structure is a document node.
-
Element Node − Every XML element is an element node. This is also the only type of node that can have attributes.
-
Attribute Node − Each attribute is considered an attribute node. It contains information about an element node, but is not actually considered to be children of the element.
-
Text Node − The document texts are considered as text node. It can consist of more information or just white space.
一些不那么常见的节点类型是 −
Some less common types of nodes are −
-
CData Node − This node contains information that should not be analyzed by the parser. Instead, it should just be passed on as plain text.
-
Comment Node − This node includes information about the data, and is usually ignored by the application.
-
Processing Instructions Node − This node contains information specifically aimed at the application.
-
Document Fragments Node
-
Entities Node
-
Entity reference nodes
-
Notations Node