The document Object Model (CATHEDRAL) is a programming interface (API) for the access to HTML or XML documents. It is defined by the World Wide Web Consortium.
In the sense of object-oriented programming that consists CATHEDRAL of a sentence of classes as well as their methods and attributes. It permits contents dynamically to computer programs to change the structure and the layout of a document.
CATHEDRAL originally developed under the impression of at least two developments, which coined/shaped the computer world in the recent past considerably. Both is the basis the necessity to be able to access the structured data in HTML and XML documents simply and uniformly.
Center of the 1990er-Jahre, when the World Wide Web became ever more popular, was invented the programming language Javascript and usual Webbrowser contained since then interpreters, that implement such Scripte. Javascript defined rudimentary possibilities for the access to the HTML document and the event treatment. Later different Browserhersteller invented different models for dynamic HTML (DHTML), which made possible a more comprehensive change the structure and the appearance of the document, while the document in the Browser is indicated. The first cathedral standards of the W3C represent the attempt to unite the different prop. guessing eras Javascript and DHTML techniques, which developed during the time of the Browserkriege, to standardize and in the long run replace. This succeeded, so that CATHEDRAL takes nowadays a central meaning during Javascript programming.
At the same time XML developed as general exchange format for the human being-readable representation of structured data, which tied to the success of HTML. For the processing of XML documents an understandable, efficient and programming language-spreading interface was necessary. CATHEDRAL represents such and defines beyond that additional interfaces for comfortable handling XML documents.
The following HTML code defines a table with the element table and different Unterelementen:
<table> <thead> <tr> <th>Vorname</th> <th>Name</th> </tr> </thead> <tbody> <tr> <td>Donald</td> <td>Duck</td> </tr> </tbody> </table>
CATHEDRAL represents the table element and its Unterelemente in the following tree structure:
By this example the structure in principle of the object model can be discussed: Documents are represented logically like a family tree. Knots (nodes) stand over "family relations" to each other in connection.
The available structure is characterized in the object model by the following relations:
table has the element knots as children (children) thead and tbody.The table Elementknoten turned around parents (parent) of thead and tbody.Elementknoten) are called brothers and sisters (siblings).On the basis of the root knot every other knot is attainable over these family relations.
The most important knot types in the CATHEDRAL are:
Attribute knots represent a special kind of knot, because they do not occur as knots in the tree structure, which is formed particularly by element knots. Attribute knots are therefore none "children "from element knots, but characteristics of them.
In the first step an existing document is read in by the program and a document object is produced. On the basis this object can be accessed by means of the methods of the API contents, structure and representation.
In particular CATHEDRAL permits
At the end of the processing through serialization so mentioned a new XML or HTML document can be generated from the document object.
CATHEDRAL is since 1998 a standard of the W3C and was since then updated several times and extended. In each case several versions (levels) exist with different modules:
This level was never formally specified. Level 0 designates the techniques usable by means of Javascript to the access to HTML documents. These were introduced by Webbrowsern such as Internet Explorer and Netscape navigator before the standardisation of the cathedral.
See also: Simple API for XML (SAX), JDOM
We found here 2 articles.
D» Divitis» Document Object Model |
We found here 5 related websites.
Index | Privacy | Terms Of Use | Sitemap | Feedback