• DOM


    DOM 中,共有 12 中不同类型的节点,nodeType 的取值以数值表示。 

    节点类型 描述 子节点
    1  Element  表示元素。  Element, Text, Comment, ProcessingInstruction, CDATASection, EntityReference
    2  Attribute  表示属性。  Text, EntityReference
    3  Text  表示元素或属性中的文本内容。  None
    4  CDATASection  表示文档中的 CDATA 部分(不会由解析器解析的文本)。  None
    5  EntityReference  表示实体引用。  Element, ProcessingInstruction, Comment, Text, CDATASection, EntityReference
    6  Entity   表示实体。  Element, ProcessingInstruction, Comment, Text, CDATASection, EntityReference
    7  ProcessingInstruction   表示处理指令。  None
    8  Comment  表示注释。  None
    9  Document  表示整个文档(DOM 树的根节点)。  Element, ProcessingInstruction, Comment, DocumentType
    10  DocumentType  向为文档定义的实体提供接口。  None
    11  DocumentFragment  表示轻量级的 Document 对象,能够容纳文档的某个部分。  Element, ProcessingInstruction, Comment, Text, CDATASection, EntityReference 
     12   Notation  表示 DTD 中声明的符号。  None
  • 相关阅读:
    路障【SPFA】
    路障【SPFA】
    糟糕的一天【栈】
    糟糕的一天【栈】
    糟糕的一天【栈】
    糟糕的一天【栈】
    2018年暑假 纪中培训总结
    2018年暑假 纪中培训总结
    2018年暑假 纪中培训总结
    仪仗队【数论】
  • 原文地址:https://www.cnblogs.com/huey/p/4910858.html
Copyright © 2020-2023  润新知