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
?
views:
26answers:
1
+3
A:
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.
Anon.
2010-07-05 02:43:03
Thanks. I didn't even think that plain old text became nodes! Accepting when SO lets me...
Delan Azabani
2010-07-05 02:43:39