You are on page 1of 2

DOM ( Document Object Model ) DOM is a Standard from w3c DOM is a read/write parser , i.

e using DOM we can perform the complete CRUD operations on our .xml document DOM is one validating parser , as a result , we can validate our .xml document on the basis of the corresponding .dtd / .xsd document DOM Parser follows object tree based to make available xml data to xml application i.e complete .xml data is stored into some set of objects . To work with DOM parser we have to collect the required DOM standards implementation from The corresponding 3 rd party vendors. DOM ARCHITECTURE :

XML APPLICATION

DOM PARSER

2
Xml Documentation

.dtd / .xsd document

6 4 5 3

Object Tree

1) XML- Application (Java Application) Making a request to DOM parser for parsing (We Know that parsing is the process of making available XML data to XML Application ) 2) DOM parser checks whether the given xml document is Well-formed xml document or not > 3) It checks whether the given dtd designed according to w3c standards or not ? 4) It validates the given xml document on the basis of the .dtd / .xsd documents . 5) It prepares one object tree and stores xml document data into that tree 6) It returns apex object or DOM object to xml application . It s responsibility of xml application retrieving xml data from object tree by using sun given DOM API

Problems with DOM parser :1) DOM parser is heavy weight parser , reason is xml document converted into some set of objects as a result load on JVM increased 2) Our xml application available with xml data only after construction of object tree 3) Memory is wasted , by allocating it for xml data , which our application doesn t required

You might also like