Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Node (computer science)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Node type === Different types of nodes in a tree are represented by specific interfaces. In other words, the node type is defined by how it communicates with other nodes. Each node has a node type property, which specifies the type of node, such as sibling or leaf. For example, if the node type property is the constant properties for a node, this property specifies the type of the node. So if a node type property is the constant node ELEMENT_NODE, one can know that this node object is an object Element. This object uses the Element interface to define all the methods and properties of that particular node. Different W3C [[World Wide Web Consortium]] node types and descriptions: *'''Document''' represents the entire document (the root-node of the DOM tree) *'''DocumentFragment''' represents a "lightweight" Document object, which can hold a portion of a document *'''DocumentType''' provides an interface to the entities defined for the document *'''ProcessingInstruction''' represents a processing instruction *'''EntityReference''' represents an entity reference *'''Element''' represents an element *'''Attr''' represents an attribute *'''Text''' represents textual content in an element or attribute *'''CDATASection''' represents a [[CDATA]] section in a document (text that will NOT be parsed by a parser) *'''Comment''' represents a comment *'''Entity''' represents an entity *'''Notation''' represents a notation declared in the DTD {| class="wikitable" |- ! 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 |}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)