IT Community - Software Programming, Web Development and Technical Support

What is DOM?

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


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > XML and SOAP

Register FAQ Members List Calendar Mark Forums Read

Reply
 
Thread Tools Display Modes
  #1  
Old 07-25-2007, 06:55 AM
devarajan.v devarajan.v is offline
D-Web Master
 
Join Date: May 2007
Posts: 382
devarajan.v is on a distinguished road
Question What is DOM?

Hi friends,

Can any one explain what is DOM?

Thanks
devarajan.V
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2  
Old 07-26-2007, 03:34 AM
vadivelanvaidyanathan vadivelanvaidyanathan is offline
D-Web Genius
 
Join Date: Feb 2007
Posts: 801
vadivelanvaidyanathan is on a distinguished road
Default Re: What is DOM?

(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.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3  
Old 08-11-2007, 01:31 AM
Venkat Venkat is offline
D-Web Master
 
Join Date: Mar 2007
Posts: 347
Venkat is on a distinguished road
Thumbs up Re: What is DOM?

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
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4  
Old 10-13-2007, 12:26 AM
mobilegeek mobilegeek is offline
D-Web Analyst
 
Join Date: Jun 2007
Posts: 205
mobilegeek is on a distinguished road
Smile Re: What is DOM?

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.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5  
Old 10-13-2007, 12:28 AM
S.Vinothkumar S.Vinothkumar is offline
D-Web Genius
 
Join Date: May 2007
Posts: 905
S.Vinothkumar is on a distinguished road
Smile Re: What is DOM?

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!
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6  
Old 12-22-2007, 01:49 AM
saravanan saravanan is offline
D-Web Sr.Programmer
 
Join Date: Jul 2007
Posts: 180
saravanan is on a distinguished road
Lightbulb Re: What is DOM?

hi

what are the disadvantages of dom?

Thanks Regards
T.Saravanan.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7  
Old 12-25-2007, 08:09 PM
shaalini shaalini is offline
D-Web Architect
 
Join Date: Apr 2007
Posts: 633
shaalini is on a distinguished road
Default Re: What is DOM?

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...
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8  
Old 03-17-2008, 11:28 PM
GDevakii GDevakii is offline
D-Web Sr.Programmer
 
Join Date: Aug 2007
Posts: 125
GDevakii is on a distinguished road
Smile Re: What is 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.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9  
Old 03-18-2008, 07:45 PM
KiruthikaSambandam KiruthikaSambandam is offline
D-Web Analyst
 
Join Date: Aug 2007
Posts: 328
KiruthikaSambandam is on a distinguished road
Default Re: What is DOM?

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 ")
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10  
Old 03-18-2008, 07:48 PM
KiruthikaSambandam KiruthikaSambandam is offline
D-Web Analyst
 
Join Date: Aug 2007
Posts: 328
KiruthikaSambandam is on a distinguished road
Default Re: What is DOM?

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
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


All times are GMT -7. The time now is 09:42 AM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.
Our Partners
One Way Moving Companies | Stamford Dentist | Euro Millions Lottery | Home Loans| Furniture

SEO by vBSEO 3.0.0