节点类型 | NodeType | Named Constant | nodeName 的返回值 | nodeValue 的返回值 |
---|---|---|---|---|
Element | 1 | ELEMENT_NODE | element name | null |
Attr | 2 | ATTIBUTE_NODE | 属性名称 | 属性值 |
Text | 3 | TEXT_NODE | #text | 节点内容 |
常用的节点类型
复制请注明出处,在世界中挣扎的灰太狼
节点类型 | NodeType | Named Constant | nodeName 的返回值 | nodeValue 的返回值 |
---|---|---|---|---|
Element | 1 | ELEMENT_NODE | element name | null |
Attr | 2 | ATTIBUTE_NODE | 属性名称 | 属性值 |
Text | 3 | TEXT_NODE | #text | 节点内容 |