This is a discussion on What is DOM? within the XML and SOAP forums, part of the Web Development category; Hi friends, Can any one explain what is DOM? Thanks devarajan.V...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| (DOM) is a W3C specification that defines a standard (abstract) programming API to build, navigate and update XML documents. It is a “tree-structure-based” interface. As per the DOM specification, the XML parsers (such as MSXML or Xerces), load the entire XML document into memory, before it can be processed. XPath is used to navigate randomly in the document, and various DOM methods are used to create and update (add elements, delete elements, add/remove attributes, etc.) the XML documents. |
| |||
| hi, The W3C Document Object Model (DOM) is a platform and language-neutral interface that allows programs and scripts to dynamically access and update the content, structure, and style of a document." The W3C DOM provides a standard set of objects for HTML and XML documents, and a standard interface for accessing and manipulating them. The W3C DOM is separated into different parts (Core, XML, and HTML) and different levels (DOM Level 1/2/3): * Core DOM - defines a standard set of objects for any structured document * XML DOM - defines a standard set of objects for XML documents * HTML DOM - defines a standard set of objects for HTML documents * The XML DOM is the Document Object Model for XML * The XML DOM is platform- and language-independent * The XML DOM defines a standard set of objects for XML * The XML DOM defines a standard way to access XML documents * The XML DOM defines a standard way to manipulate XML documents * The XML DOM is a W3C standard The DOM views XML documents as a tree-structure. All elements; their containing text and their attributes, can be accessed through the DOM tree. Their contents can be modified or deleted, and new elements can be created. The elements, their text, and their attributes are all known as nodes.
__________________ Venkat knowledge is Power |
| |||
| Short for Document Object Model, the specification for how objects in a Web page (text, images, headers, links, etc.) are represented. The DOM defines what attributes are associated with each object, and how the objects and attributes can be manipulated. |
| |||
| DOM stands for the Document Object Model, and it's a way of representing a document (be it XML or HTML) using Object Oriented programming. It basically allows you to have access to any part of the document you want by calling functions. You can use DOM in JavaScript, or you can use it to parse an XML document (extract nodes from it).
__________________ S.VinothkumaR Behind me is infinite power, Before me is Endless Possibility, Around me is Boundless Opportunity, Why should I fear! |
| |||
| 1)DOM requires more memory resources and is not recommended when the document size is big.DOM creates an in-memory representation of the whole document 2) The disadvantages of DOM binding are that it requires the developer to write more complex code depending on the schema and requires the developer to write more boilerplate code for navigating the DOM tree, which results in reduced performance
__________________ Shaalini.S ![]() Be the Best of Whatever you are... |
| |||
| DOM stands for Document Object Model, and allows programmers generic access - adding, deleting, and manipulating - of all styles, attributes, and elements in a document. It can be accessed via any language available in the browser, including Java, JavaScript/ECMAScript/JScript, and VBScript (MSIE only). For practicality's sake, the syntax used in this tutorial will be that of JavaScript. The DOM is supported most completely starting in IE 5 and Gecko (NS6 and upwards, such as Firefox.) Every tag, attribute, style, and piece of text is available to be accessed and manipulated via the DOM -- the possibilities are endless. This tutorial will cover the basics of the DOM: adding and removing tags, attributes and styles, animating existing elements, and hiding/ showing elements on a page. Obviously, to cover the entire scope of all that the DOM has to offer, an entire book is needed. This tutorial simply serves as an introduction to the subject. Just so you know. The DOM is constantly being revised by the W3C, with browsers at the same time constantly trying to support the latest recommended version of the DOM. As of IE6 and Firefox 1.0, DOM 2 best encompasses what the two browsers currently support. DOM 3 is the next major version in the works. Before you get started, you need to know a few terms that we will use: * Node: A reference to an element, its attributes, or text from the document. * Element: A representation of a <TAG>. * Attribute: A property of an element. HREF is an attribute of <A>, for example. |
| |||
| DOM DOM stands for Document Object Model, and allows programmers generic access - adding, deleting, and manipulating - of all styles, attributes, and elements in a document. It can be accessed via any language available in the browser, including Java, JavaScript/ECMAScript/JScript, and VBScript (MSIE only). For practicality's sake, the syntax used in this tutorial will be that of JavaScript. The DOM is supported most completely starting in IE 5 and Gecko (NS6 and upwards, such as Firefox.) Every tag, attribute, style, and piece of text is available to be accessed and manipulated via the DOM -- the possibilities are endless. This tutorial will cover the basics of the DOM: adding and removing tags, attributes and styles, animating existing elements, and hiding/ showing elements on a page. Obviously, to cover the entire scope of all that the DOM has to offer, an entire book is needed. This tutorial simply serves as an introduction to the subject. Just so you know. The DOM is constantly being revised by the W3C, with browsers at the same time constantly trying to support the latest recommended version of the DOM. As of IE6 and Firefox 1.0, DOM 2 best encompasses what the two browsers currently support. DOM 3 is the next major version in the works. Before you get started, you need to know a few terms that we will use: * Node: A reference to an element, its attributes, or text from the document. * Element: A representation of a <TAG>. * Attribute: A property of an element. HREF is an attribute of <A>, for example. The DOM and browser compatibility IE5 and Netscape 6 can be considered the first two browsers to begin supporting the modern DOM, or DOM level 2. More modern browsers that followed such as Firefox offer more complete support for DOM 2 (though not 100%). Luckily we don't really have to know exactly the browser versions that support DOM 2, as we can just use object detection to generically detect support for a particular DOM property or method we want to use. In the DOM, the most commonly used method is: document.getElementById Due to this, we can just detect support for this method before proceeding with our DOM related code: if (document.getElementById) document.getElementById("div").getAttribute("align ") |
| |||
| What programming languages can use with the DOM? This will depend on what hosting implementation you want to use it with. Your favorite browser might implement a JavaScript or VBScript interface, so you can use those scripting languages within the page itself to manipulate the page or change the CSS style sheet. Your favorite editor might implement a Scheme or Java interface so you can write an executable in those languages that talks to your editor to manipulate the page. You might be able to write an application in C++ that uses the DOM interface to transfer information from the page in your browser to a database via an ODBC driver. We are writing a set of interfaces; different companies will be able to implement these interfaces in different ways. It is unlikely that any one company will give you a choice of C++ and Java and Scheme and Perl and Python and ..., but interfaces in all these languages will be possible, since the DOM itself is language-neutral. Thanks KiruthikaSambandam |
| |||
| DOM - DOCUMENT OBJECT MODEL dom represent every element as objects in a html or xml. And builds the all elements in a hierarchy tree. Consider the following HTML document <html> <head> <title>Example</title> </head> <body> <div> Kamala Kannan </div> </body> </html> in every document the object document is root element or root object then we can represent the <div< element like following structure document/html/body/div this structure can represent in JS as follows like all the element can represent using the DOM tree. |
| |||
| If the DOM is language-neutral, what language do you specify the interface in? The Object Management Group Interface Definition Language (OMG IDL) was chosen as it was designed for specifying language and implementation-neutral interfaces. Various other IDLs could be used; the use of OMG IDL does not imply a requirement to use a specific object binding runtime. We expect that the DOM can be implemented using CORBA, COM, or Java Virtual Machine runtime bindings. We expect that many implementations of the DOM will use bindings to various programming languages. The DOM specifies bindings for Java and ECMAScript (the standardization of JavaScript/JScript by the European Computer Manufacturer's Association (ECMA) defined by ECMA-262) as appendices to the specification; other language bindings (for example, ANSI C++, Perl, or VBScript) may be supplied by other interested parties. Obviously it would be good if different implementations in other languages are consistent with each other. |
| |||
| The Document Object Model (DOM) is an application programming interface (API) for valid HTML and well-formed XML documents.With the Document Object Model, programmers can build documents, navigate their structure, and add, modify, or delete elements and content. |
![]() |
| Thread Tools | |
| Display Modes | |
| |