Учебно-методические материалы для студентов кафедры АСОИУ

Учебные программы » Веб-программирование » Дополнительные материалы

W3C Document Object Model (DOM)

DOM Introduction

The W3C Document Object Model is a "platform- and language-neutral interface that will allow programs and scripts to dynamically access and update the content, structure and style of documents. The document can be further processed and the results of that processing can be incorporated back into the presented page."

"The goal of the DOM group is to define a programmatic interface for XML and HTML. The DOM is separated into three parts: Core, HTML, and XML. The Core DOM provides a low-level set of objects that can represent any structured document. While by itself this interface is capable of representing any HTML or XML document, the core interface is a compact and minimal design for manipulating the document's contents. Depending upon the DOM's usage, the core DOM interface may not be convenient or appropriate for all users. The HTML and XML specifications provide additional, higher-level interfaces that are used with the core specification to provide a more convenient view into the document. These specifications consist of objects and methods that provide easier and more direct access into the specific types of documents. Key industry players are participating in the DOM Working Group, including editors and contributors from ArborText, IBM, Inso EPS, JavaSoft, Microsoft, Netscape, Novell, the Object Management Group, SoftQuad, Sun Microsystems, Texcel, and W3C." The Chair of the W3C DOM WG is Lauren Wood of SoftQuad.

The DOM specification "defines the Document Object Model, a platform- and language-neutral interface that will allow programs and scripts to dynamically access and update the content, structure and style of documents. The Document Object Model provides a standard set of objects for representing HTML and XML documents, a standard model of how these objects can be combined, and a standard interface for accessing and manipulating them. Vendors can support the DOM as an interface to their proprietary data structures and APIs, and content authors can write to the standard DOM interfaces rather than product-specific APIs, thus increasing interoperability on the Web." [from WD-DOM-19980318]

DOM is being designed at several levels:

  • Level 1. This concentrates on the actual core, HTML, and XML document models. It contains functionality for document navigation and manipulation.
  • Level 2. Includes a style sheet object model, and defines functionality for manipulating the style information attached to a document. It also enables traversals on the document, defines an event model and provides support for XML namespaces.
  • Level 3. Will address document loading and saving, as well as content models (such as DTDs and schemas) with document validation support. In addition, it will also address document views and formatting, key events and event groups. First public working drafts are available.
  • Further Levels. These may specify some interface with the possibly underlying window system, including some ways to prompt the user. They may also contain a query language interface, and address multithreading and synchronization, security, and repository."

W3C DOM Resources

Анатольев А.Г., 27.09.2013

Постоянный адрес этой страницы:

↑ В начало страницы