XML DOM - Model
XML DOM - Model
Now that we know what DOM means, let's see what a DOM structure is. A DOM document is a
collection of nodes or pieces of information, organized in a hierarchy. Some types of nodes may
have child nodes of various types and others are leaf nodes that cannot have anything under
them in the document structure. Following is a list of the node types, with a list of node types
that they may have as children −
Text − No children
CDATASection − No children
Example
Consider the DOM representation of the following XML document node.xml.
<Company>
<FirstName>Tanmay</FirstName>
<LastName>Patil</LastName>
<ContactNo>1234567890</ContactNo>
</Employee>
<FirstName>Taniya</FirstName>
<LastName>Mishra</LastName>
https://www.tutorialspoint.com/dom/xml_dom_model.htm 1/2
23/10/2021 16:29 XML DOM - Model
<ContactNo>1234667898</ContactNo>
</Employee>
</Company>
The Document Object Model of the above XML document would be as follows −
https://www.tutorialspoint.com/dom/xml_dom_model.htm 2/2