HTML DOM nodeType 属性
幻冰小站 浏览次数:581 2020-07-17 11:17:03
<div style="margin: 0px 0px 0px 25px; padding: 30px 0px 32px; border-width: 0px 0px 1px; border-top-style: initial; border-right-style: initial; border-bottom-style: solid; border-left-style: initial; border-top-color: initial; border-right-color: initial; border-bottom-color: rgb(170, 170, 170); border-left-color: initial; border-image: initial; width: 810px; color: rgb(0, 0, 0); font-family: PingFangSC-Regular, Verdana, Arial, 微软雅黑, 宋体; font-size: 14px; background-color: rgb(253, 252, 248);"><h2 style="margin: 0px; padding: 0px; border: 0px; font-weight: bold; font-size: 18px; color: rgb(63, 63, 63); font-family: 微软雅黑;">实例</h2><p style="margin: 15px 0px 0px; padding: 0px; border: 0px; line-height: 21px;">获得 body 元素的节点类型:</p><pre style="margin-top: 15px; margin-bottom: 0px; padding: 20px; border: 1px dotted rgb(119, 136, 85); font-family: Consolas; width: 765px; background: rgb(245, 245, 245); line-height: 1.4;">document.body.nodeType;</pre><p style="margin: 15px 0px 0px; padding: 0px; border: 0px; line-height: 21px;">结果:</p><pre style="margin-top: 15px; margin-bottom: 0px; padding: 20px; border: 1px dotted rgb(119, 136, 85); font-family: Consolas; width: 765px; background: rgb(245, 245, 245); line-height: 1.4;">1</pre></div><div style="margin: 0px 0px 0px 25px; padding: 30px 0px 32px; border-width: 0px 0px 1px; border-top-style: initial; border-right-style: initial; border-bottom-style: solid; border-left-style: initial; border-top-color: initial; border-right-color: initial; border-bottom-color: rgb(170, 170, 170); border-left-color: initial; border-image: initial; width: 810px; color: rgb(0, 0, 0); font-family: PingFangSC-Regular, Verdana, Arial, 微软雅黑, 宋体; font-size: 14px; background-color: rgb(253, 252, 248);"><h2 style="margin: 0px; padding: 0px; border: 0px; font-weight: bold; font-size: 18px; color: rgb(63, 63, 63); font-family: 微软雅黑;">定义和用法</h2><p style="margin: 15px 0px 0px; padding: 0px; border: 0px; line-height: 21px;">nodeType 属性返回以数字值返回指定节点的节点类型。</p><p style="margin: 15px 0px 0px; padding: 0px; border: 0px; line-height: 21px;">如果节点是元素节点,则 nodeType 属性将返回 1。</p><p style="margin: 15px 0px 0px; padding: 0px; border: 0px; line-height: 21px;">如果节点是属性节点,则 nodeType 属性将返回 2。</p></div><div style="margin: 0px 0px 0px 25px; padding: 30px 0px 32px; border-width: 0px 0px 1px; border-top-style: initial; border-right-style: initial; border-bottom-style: solid; border-left-style: initial; border-top-color: initial; border-right-color: initial; border-bottom-color: rgb(170, 170, 170); border-left-color: initial; border-image: initial; width: 810px; color: rgb(0, 0, 0); font-family: PingFangSC-Regular, Verdana, Arial, 微软雅黑, 宋体; font-size: 14px; background-color: rgb(253, 252, 248);"><h2 style="margin: 0px; padding: 0px; border: 0px; font-weight: bold; font-size: 18px; color: rgb(63, 63, 63); font-family: 微软雅黑;">浏览器支持</h2><table class="dataintable browsersupport" style="margin: 15px 0px 0px; padding: 0px; border: 1px solid rgb(170, 170, 170); border-collapse: collapse; width: 566px;"><tbody style="margin: 0px; padding: 0px; border: 0px;"><tr style="margin: 0px; padding: 0px; border: 0px; background-color: rgb(245, 245, 245);"><th style="margin: 0px; padding: 0px; border: 1px solid rgb(221, 221, 221); vertical-align: middle; text-align: center; color: rgb(51, 51, 51); height: 36px; font-weight: 400;">IE</th><th style="margin: 0px; padding: 0px; border: 1px solid rgb(221, 221, 221); vertical-align: middle; text-align: center; color: rgb(51, 51, 51); height: 36px; font-weight: 400;">Firefox</th><th style="margin: 0px; padding: 0px; border: 1px solid rgb(221, 221, 221); vertical-align: middle; text-align: center; color: rgb(51, 51, 51); height: 36px; font-weight: 400;">Chrome</th><th style="margin: 0px; padding: 0px; border: 1px solid rgb(221, 221, 221); vertical-align: middle; text-align: center; color: rgb(51, 51, 51); height: 36px; font-weight: 400;">Safari</th><th style="margin: 0px; padding: 0px; border: 1px solid rgb(221, 221, 221); vertical-align: middle; text-align: center; color: rgb(51, 51, 51); height: 36px; font-weight: 400;">Opera</th></tr><tr style="margin: 0px; padding: 0px; border: 0px; background-color: rgb(255, 255, 255);"><td class="bsIE" style="margin: 0px; padding: 0px; border: 1px solid rgb(221, 221, 221); vertical-align: middle; text-align: center; height: 86px; width: 113px; background: url(&quot;/ui2017/compatible_ie.png&quot;) center center no-repeat rgb(253, 252, 248);"></td><td class="bsFirefox" style="margin: 0px; padding: 0px; border: 1px solid rgb(221, 221, 221); vertical-align: middle; text-align: center; height: 86px; width: 112px; background: url(&quot;/ui2017/compatible_firefox.png&quot;) center center no-repeat rgb(253, 252, 248);"></td><td class="bsChrome" style="margin: 0px; padding: 0px; border: 1px solid rgb(221, 221, 221); vertical-align: middle; text-align: center; height: 86px; width: 112px; background: url(&quot;/ui2017/compatible_chrome.png&quot;) center center no-repeat rgb(253, 252, 248);"></td><td class="bsSafari" style="margin: 0px; padding: 0px; border: 1px solid rgb(221, 221, 221); vertical-align: middle; text-align: center; height: 86px; width: 112px; background: url(&quot;/ui2017/compatible_safari.png&quot;) center center no-repeat rgb(253, 252, 248);"></td><td class="bsOpera" style="margin: 0px; padding: 0px; border: 1px solid rgb(221, 221, 221); vertical-align: middle; text-align: center; height: 86px; width: 112px; background: url(&quot;/ui2017/compatible_opera.png&quot;) center center no-repeat rgb(253, 252, 248);"></td></tr></tbody></table><p style="margin: 15px 0px 0px; padding: 0px; border: 0px; line-height: 21px;">所有主流浏览器均支持 nodeType 属性。</p></div><div style="margin: 0px 0px 0px 25px; padding: 30px 0px 32px; border-width: 0px 0px 1px; border-top-style: initial; border-right-style: initial; border-bottom-style: solid; border-left-style: initial; border-top-color: initial; border-right-color: initial; border-bottom-color: rgb(170, 170, 170); border-left-color: initial; border-image: initial; width: 810px; color: rgb(0, 0, 0); font-family: PingFangSC-Regular, Verdana, Arial, 微软雅黑, 宋体; font-size: 14px; background-color: rgb(253, 252, 248);"><h2 style="margin: 0px; padding: 0px; border: 0px; font-weight: bold; font-size: 18px; color: rgb(63, 63, 63); font-family: 微软雅黑;">语法</h2><pre style="margin-top: 15px; margin-bottom: 0px; padding: 20px; border: 1px dotted rgb(119, 136, 85); font-family: Consolas; width: 765px; background: rgb(245, 245, 245); line-height: 1.4;">node.nodeType</pre><h3 style="margin: 25px 0px 0px; padding: 0px; border: 0px; font-weight: bold; font-size: 15px;">技术细节</h3><table class="dataintable" style="margin: 15px 0px 0px; padding: 0px; border: 1px solid rgb(170, 170, 170); border-collapse: collapse; width: 809px;"><tbody style="margin: 0px; padding: 0px; border: 0px;"><tr style="margin: 0px; padding: 0px; border: 0px; background-color: rgb(245, 245, 245);"><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top; width: 183px;">返回值:</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">字符串值,代表节点的节点类型。</td></tr><tr style="margin: 0px; padding: 0px; border: 0px; background-color: rgb(255, 255, 255);"><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">DOM 版本</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">Core Level 1 Node Object</td></tr></tbody></table></div><div style="margin: 0px 0px 0px 25px; padding: 30px 0px 32px; border-width: 0px 0px 1px; border-top-style: initial; border-right-style: initial; border-bottom-style: solid; border-left-style: initial; border-top-color: initial; border-right-color: initial; border-bottom-color: rgb(170, 170, 170); border-left-color: initial; border-image: initial; width: 810px; color: rgb(0, 0, 0); font-family: PingFangSC-Regular, Verdana, Arial, 微软雅黑, 宋体; font-size: 14px; background-color: rgb(253, 252, 248);"><h2 style="margin: 0px; padding: 0px; border: 0px; font-weight: bold; font-size: 18px; color: rgb(63, 63, 63); font-family: 微软雅黑;">Node Types</h2><p style="margin: 15px 0px 0px; padding: 0px; border: 0px; line-height: 21px;">文档、元素、属性以及 HTML 或 XML 文档的其他方面拥有不同的节点类型。</p><p style="margin: 15px 0px 0px; padding: 0px; border: 0px; line-height: 21px;">存在 12 种不同的节点类型,其中可能会有不同节点类型的子节点:</p><table class="dataintable" style="margin: 15px 0px 0px; padding: 0px; border: 1px solid rgb(170, 170, 170); border-collapse: collapse; width: 809px;"><tbody style="margin: 0px; padding: 0px; border: 0px;"><tr style="margin: 0px; padding: 0px; border: 0px; background-color: rgb(245, 245, 245);"><th colspan="2" style="margin: 0px; padding: 10px; border: 1px solid rgb(63, 63, 63); vertical-align: baseline; background-color: rgb(63, 63, 63); text-align: left; color: rgb(255, 255, 255);">节点类型</th><th style="margin: 0px; padding: 10px; border: 1px solid rgb(63, 63, 63); vertical-align: baseline; background-color: rgb(63, 63, 63); text-align: left; color: rgb(255, 255, 255);">描述</th><th style="margin: 0px; padding: 10px; border: 1px solid rgb(63, 63, 63); vertical-align: baseline; background-color: rgb(63, 63, 63); text-align: left; color: rgb(255, 255, 255);">子节点</th></tr><tr style="margin: 0px; padding: 0px; border: 0px; background-color: rgb(255, 255, 255);"><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top; width: 21px;">1</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top; width: 183px;">Element</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top; width: 264px;">代表元素</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">Element, Text, Comment, ProcessingInstruction, CDATASection, EntityReference</td></tr><tr style="margin: 0px; padding: 0px; border: 0px; background-color: rgb(245, 245, 245);"><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">2</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">Attr</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">代表属性</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">Text, EntityReference</td></tr><tr style="margin: 0px; padding: 0px; border: 0px; background-color: rgb(255, 255, 255);"><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">3</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">Text</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">代表元素或属性中的文本内容。</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">None</td></tr><tr style="margin: 0px; padding: 0px; border: 0px; background-color: rgb(245, 245, 245);"><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">4</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">CDATASection</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">代表文档中的 CDATA 部分(不会由解析器解析的文本)。</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">None</td></tr><tr style="margin: 0px; padding: 0px; border: 0px; background-color: rgb(255, 255, 255);"><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">5</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">EntityReference</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">代表实体引用。</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">Element, ProcessingInstruction, Comment, Text, CDATASection, EntityReference</td></tr><tr style="margin: 0px; padding: 0px; border: 0px; background-color: rgb(245, 245, 245);"><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">6</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">Entity</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">代表实体。</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">Element, ProcessingInstruction, Comment, Text, CDATASection, EntityReference</td></tr><tr style="margin: 0px; padding: 0px; border: 0px; background-color: rgb(255, 255, 255);"><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">7</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">ProcessingInstruction</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">代表处理指令。</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">None</td></tr><tr style="margin: 0px; padding: 0px; border: 0px; background-color: rgb(245, 245, 245);"><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">8</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">Comment</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">代表注释。</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">None</td></tr><tr style="margin: 0px; padding: 0px; border: 0px; background-color: rgb(255, 255, 255);"><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">9</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">Document</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">代表整个文档(DOM 树的根节点)。</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">Element, ProcessingInstruction, Comment, DocumentType</td></tr><tr style="margin: 0px; padding: 0px; border: 0px; background-color: rgb(245, 245, 245);"><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">10</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">DocumentType</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">向为文档定义的实体提供接口</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">None</td></tr><tr style="margin: 0px; padding: 0px; border: 0px; background-color: rgb(255, 255, 255);"><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">11</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">DocumentFragment</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">代表轻量级的 Document 对象,能够容纳文档的某个部分</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">Element, ProcessingInstruction, Comment, Text, CDATASection, EntityReference</td></tr><tr style="margin: 0px; padding: 0px; border: 0px; background-color: rgb(245, 245, 245);"><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">12</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">Notation</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">代表 DTD 中声明的符号。</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">None</td></tr></tbody></table></div><div style="margin: 0px 0px 0px 25px; padding: 30px 0px 32px; border-width: 0px 0px 1px; border-top-style: initial; border-right-style: initial; border-bottom-style: solid; border-left-style: initial; border-top-color: initial; border-right-color: initial; border-bottom-color: rgb(170, 170, 170); border-left-color: initial; border-image: initial; width: 810px; color: rgb(0, 0, 0); font-family: PingFangSC-Regular, Verdana, Arial, 微软雅黑, 宋体; font-size: 14px; background-color: rgb(253, 252, 248);"><h2 style="margin: 0px; padding: 0px; border: 0px; font-weight: bold; font-size: 18px; color: rgb(63, 63, 63); font-family: 微软雅黑;">节点类型 - 返回值</h2><p style="margin: 15px 0px 0px; padding: 0px; border: 0px; line-height: 21px;">对于每种节点类型,nodeName 和 nodeValue 属性的返回值:</p><table class="dataintable" style="margin: 15px 0px 0px; padding: 0px; border: 1px solid rgb(170, 170, 170); border-collapse: collapse; width: 809px;"><tbody style="margin: 0px; padding: 0px; border: 0px;"><tr style="margin: 0px; padding: 0px; border: 0px; background-color: rgb(245, 245, 245);"><th colspan="2" style="margin: 0px; padding: 10px; border: 1px solid rgb(63, 63, 63); vertical-align: baseline; background-color: rgb(63, 63, 63); text-align: left; color: rgb(255, 255, 255);">节点类型</th><th style="margin: 0px; padding: 10px; border: 1px solid rgb(63, 63, 63); vertical-align: baseline; background-color: rgb(63, 63, 63); text-align: left; color: rgb(255, 255, 255);">nodeName 返回</th><th style="margin: 0px; padding: 10px; border: 1px solid rgb(63, 63, 63); vertical-align: baseline; background-color: rgb(63, 63, 63); text-align: left; color: rgb(255, 255, 255);">nodeValue 返回</th></tr><tr style="margin: 0px; padding: 0px; border: 0px; background-color: rgb(255, 255, 255);"><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top; width: 21px;">1</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top; width: 183px;">Element</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top; width: 264px;">元素名</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">null</td></tr><tr style="margin: 0px; padding: 0px; border: 0px; background-color: rgb(245, 245, 245);"><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">2</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">Attr</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">属性名称</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">属性值</td></tr><tr style="margin: 0px; padding: 0px; border: 0px; background-color: rgb(255, 255, 255);"><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">3</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">Text</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">#text</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">节点的内容</td></tr><tr style="margin: 0px; padding: 0px; border: 0px; background-color: rgb(245, 245, 245);"><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">4</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">CDATASection</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">#cdata-section</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">节点的内容</td></tr><tr style="margin: 0px; padding: 0px; border: 0px; background-color: rgb(255, 255, 255);"><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">5</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">EntityReference</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">实体引用名称</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">null</td></tr><tr style="margin: 0px; padding: 0px; border: 0px; background-color: rgb(245, 245, 245);"><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">6</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">Entity</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">实体名称</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">null</td></tr><tr style="margin: 0px; padding: 0px; border: 0px; background-color: rgb(255, 255, 255);"><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">7</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">ProcessingInstruction</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">target</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">节点的内容</td></tr><tr style="margin: 0px; padding: 0px; border: 0px; background-color: rgb(245, 245, 245);"><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">8</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">Comment</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">#comment</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">注释文本</td></tr><tr style="margin: 0px; padding: 0px; border: 0px; background-color: rgb(255, 255, 255);"><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">9</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">Document</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">#document</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">null</td></tr><tr style="margin: 0px; padding: 0px; border: 0px; background-color: rgb(245, 245, 245);"><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">10</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">DocumentType</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">文档类型名称</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">null</td></tr><tr style="margin: 0px; padding: 0px; border: 0px; background-color: rgb(255, 255, 255);"><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">11</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">DocumentFragment</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">#document 片段</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">null</td></tr><tr style="margin: 0px; padding: 0px; border: 0px; background-color: rgb(245, 245, 245);"><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">12</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">Notation</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">符号名称</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">null</td></tr></tbody></table></div><div style="margin: 0px 0px 0px 25px; padding: 30px 0px 32px; border-width: 0px 0px 1px; border-top-style: initial; border-right-style: initial; border-bottom-style: solid; border-left-style: initial; border-top-color: initial; border-right-color: initial; border-bottom-color: rgb(170, 170, 170); border-left-color: initial; border-image: initial; width: 810px; color: rgb(0, 0, 0); font-family: PingFangSC-Regular, Verdana, Arial, 微软雅黑, 宋体; font-size: 14px; background-color: rgb(253, 252, 248);"><h2 style="margin: 0px; padding: 0px; border: 0px; font-weight: bold; font-size: 18px; color: rgb(63, 63, 63); font-family: 微软雅黑;">NodeTypes - Named Constants</h2><table class="dataintable" style="margin: 15px 0px 0px; padding: 0px; border: 1px solid rgb(170, 170, 170); border-collapse: collapse; width: 809px;"><tbody style="margin: 0px; padding: 0px; border: 0px;"><tr style="margin: 0px; padding: 0px; border: 0px; background-color: rgb(245, 245, 245);"><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top; width: 223px;">NodeType</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">Named Constant</td></tr><tr style="margin: 0px; padding: 0px; border: 0px; background-color: rgb(255, 255, 255);"><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">1</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">ELEMENT_NODE</td></tr><tr style="margin: 0px; padding: 0px; border: 0px; background-color: rgb(245, 245, 245);"><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">2</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">ATTRIBUTE_NODE</td></tr><tr style="margin: 0px; padding: 0px; border: 0px; background-color: rgb(255, 255, 255);"><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">3</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">TEXT_NODE</td></tr><tr style="margin: 0px; padding: 0px; border: 0px; background-color: rgb(245, 245, 245);"><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">4</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">CDATA_SECTION_NODE</td></tr><tr style="margin: 0px; padding: 0px; border: 0px; background-color: rgb(255, 255, 255);"><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">5</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">ENTITY_REFERENCE_NODE</td></tr><tr style="margin: 0px; padding: 0px; border: 0px; background-color: rgb(245, 245, 245);"><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">6</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">ENTITY_NODE</td></tr><tr style="margin: 0px; padding: 0px; border: 0px; background-color: rgb(255, 255, 255);"><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">7</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">PROCESSING_INSTRUCTION_NODE</td></tr><tr style="margin: 0px; padding: 0px; border: 0px; background-color: rgb(245, 245, 245);"><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">8</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">COMMENT_NODE</td></tr><tr style="margin: 0px; padding: 0px; border: 0px; background-color: rgb(255, 255, 255);"><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">9</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">DOCUMENT_NODE</td></tr><tr style="margin: 0px; padding: 0px; border: 0px; background-color: rgb(245, 245, 245);"><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">10</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">DOCUMENT_TYPE_NODE</td></tr><tr style="margin: 0px; padding: 0px; border: 0px; background-color: rgb(255, 255, 255);"><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">11</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">DOCUMENT_FRAGMENT_NODE</td></tr><tr style="margin: 0px; padding: 0px; border: 0px; background-color: rgb(245, 245, 245);"><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">12</td><td style="margin: 0px; padding: 9px; border: 1px solid rgb(170, 170, 170); vertical-align: text-top;">NOTATION_NODE</td></tr></tbody></table></div><p><br></p>