XML technologies / XML / XML in a Nutshell / DOM reference / Object hierarchy

(Excerpt from "XML in a Nutshell" by Elliotte Rusty Harold & W. Scott Means)

The following table shows the hierarchy of DOM objects:

Object

Allowed child objects

Document

Element (at most one)
ProcessingInstruction
Comment
DocumentType (at most one)

DocumentFragment

Element ProcessingInstruction Comment Text CDATASection EntityReference

DocumentType

None (leaf nodes)

EntityReference

Element ProcessingInstruction Comment Text CDATASection EntityReference

Element

Element Text Comment ProcessingInstruction CDATASection EntityReference

Attr

Text EntityReference

ProcessingInstruction

None (leaf nodes)

Comment

None (leaf nodes)

Text

None (leaf nodes)

CDATASection

None (leaf nodes)

Entity

Element ProcessingInstruction Comment Text CDATASection EntityReference

Notation

None (leaf nodes)

  

 

 

 

back to top