Reputation: 81482
Why are Element
objects a subclass of Node
objects? Aren't elements and nodes the same thing, with different names? Or are there other kinds of Node
?
Upvotes: 2
Views: 156
Reputation: 60033
Element
s are not the only node type.
Element
nodes are nodes that contain other nodes.
Text
nodes are nodes that contain text.
Attribute
nodes are nodes that contain attributes.
Upvotes: 4