Document Object Model (DOM) and, HTML documents and documents for an XML application-programming-interface (API) is. This document's logical structure and is intended to define how to access and manipulate documents. In the DOM specification "document" term is used in a broad sense. Masu Masu XML is becoming used as a way to represent many different types of information, such information may be stored on various systems. Much of this is what would traditionally seen as data rather than as documents. Nevertheless, XML represents data as a document, DOM may be used in order to process this data. DOM for the programmer to build documents, navigate their structure, elements and add content, correct, can be removed. Those found in HTML documents and XML documents are accessed using the DOM anything, change, delete, may be added, there are exceptions thirty-two. In particular, XML for the internal subset and external subset DOM interface has not yet been specified.
- HTML DOM is a standard object model for HTML or we can say a standard programming interface for HTML.
- HTML DOM defines the objects and properties of all HTML elements, and the methods (interface) to access them.
- HTML DOM is a standard for how to get, change, add, or delete HTML elements.
HTML DOM is a programming API for documents. This document structure is similar to model it. For example, consider the HTML table that was taken from the document.
The DOM represents this table like this.
- SAX is read only , DOM is read and write both.
- SAX is forward only where as DOM can access both was forward as well as backwards.
- SAX is an event based parser, but DOM is not.
- SAX parses the file as it reads where as the DOM loads the file into memory to parse the file.
- SAX does not have memory constraints where as the DOM has memory constraints as xml file is loaded into the memory to parse the file.
Robust API for DOM tree.
- Relatively simple to modify the data structure and extract data.
- Stores the entire document in memory.
- As DOM was written for any language, method naming conventions don't follow standard java programming conventions.