Open Directory Site XMLDOM Tutorials

ASP | XML | VBScript | JavaScript | ADO | CSS | XMLDOM | PHP | Operating Systems

Home >> XMLDOM >>DOM Node Types

DOM Node Types

 

Node Types

All nodes are separated in different types. Below there is a list of the types, and what the .nodeName and the .nodeValue properties will return. In Internet Explorer 5, you can use the .nodeTypeString property to return the nodeType as a string.

 

nodeType nodeTypeString nodeName nodeValue

1 element tagName null

2 attribute name value

3 text #text content of node

4 cdatasection #cdatasection content of node

5 entityreference entity reference name null

6 entity entity name null

7 processinginstruction target content of node

8 comment #comment comment text

9 document #document null

10 documenttype doctype name null

11 documentfragment #document fragment null

12 notation notation name null

 

NodeTypes - Named Constants

NodeType Named Constant

1 ELEMENT_NODE

2 ATTRIBUTE_NODE

3 TEXT_NODE

4 CDATA_SECTION_NODE

5 ENTITY_REFERENCE_NODE

6 ENTITY_NODE

7 PROCESSING_INSTRUCTION_NODE

8 COMMENT_NODE

9 DOCUMENT_NODE

10 DOCUMENT_TYPE_NODE

11 DOCUMENT_FRAGMENT_NODE

12 NOTATION_NODE

Cheap Web Hosting Articles - Web Site Design & Web Hosting Tutorials - Domain Hosting