The following table shows the DOM object hierarchy:
Object
Permitted child objects
Document
Element (one is the maximum)
ProcessingInstruction
Comment
DocumentType (one is the maximum)
DocumentFragment
Element ProcessingInstruction Comment Text CDATASection EntityReference
DocumentType
None (leaf node)
EntityReference
Element
Element Text Comment ProcessingInstruction CDATASection EntityReference
Attr
Text EntityReference
Text
CDATASection
Entity
Notation