HTML

HTML Projects

HTML Project

adplus-dvertising
HTMLDOM Interview Questions with Answers

Introduction of DOM

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.

History of DOM-

Document Object Model is intertwined with the history of the "browser wars" of the late 1990s between Netscape Navigator and Microsoft Internet Explorer, as well as with that of JavaScript and JScript, the first scripting languages to be widely implemented in the layout engines of web browsers.

Originally DOM, JavaScript and Java scripts were produced as a specification for portably possible to allow the web between programs. The "Dynamic HTML" is the nearest ancestor of the DOM, which originally had been widely considered for Browser. However, DOM Working Group was formed when the W3C, HTML and XML editor also joined other area vendors, including editors and document repositories. Some of these vendors, XML was developed before the work was on the SGML. As a result, DOM SGML, HyTime and gloves that are affected by standards. Some of these vendors, SGML and XML editors for editors and document repositories in order to provide API, has also been developed for their own document object model, object model also affect these DOM or.

What is HTML DOM-
  • 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.
Structure of HTML DOM (DOM Tree) -

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.

Difference between SAX and DOM-

  • 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.

Advantages of HTML DOM-

  • Robust API for DOM tree.

  • Relatively simple to modify the data structure and extract data.

Disadvantages of HTML DOM-

  • Stores the entire document in memory.
  • As DOM was written for any language, method naming conventions don't follow standard java programming conventions.