Fill in Order Details

  • Submit paper details for free using our simple order form

Make Payment Securely

  • Add funds to your account. There are no upfront payments. The writer will only be paid once you have approved your paper

Writing Process

  • The best qualified expert writer is assigned to work on your order
  • Your paper is written to standard and delivered as per your instructions

Download your paper

  • Download the completed paper from your online account or your email
  • You can request a plagiarism and quality report along with your paper

Document Model Object – A brief introduction

Document Model Object – A brief introduction

Summary

This paper provides the reader with a brief description of the Document Object Model, also known as DOM that is used in the web applications to display and analyze data to enable a better user experience and interaction. The history, use of DOM in parsing objects, and example in using the API methods are also discussed here.

Introduction – DOM, Implementation and Application Programming Interfaces (API)

DOM is a cross platform and language neutral interface standard to interact with objects that are generated in web connections using HTML, XML, XHTML documents. Documents downloaded can be parsed and data can be analyzed by using these objects to further use or store for future use. The predecessor to DOM is JavaScript that is loaded by the web browser in parsing the page and interacting with the data that is loaded through these documents for display or analysis purposes. When different browsers came into existence, a need for standardization arose and hence the DOM specification, the latest being the Draft version 6 released in 2012 [1]. Even though web development led to DOM specification, there are multitudes of other applications that use DOM in passing objects through messages in networks.

Implementation refers to developing inner workings of the objects that are generated. Libraries are provided by specific implementations like, libxml2, Xerces, MSXML, etc. Access of DOM objects in any of these implementations is through Application Programming Interfaces (API). Java community development came up with their JAXP (Java API for XML Processing); JDOM, a Java based package integrates with SAX parsers in building DOM objects; Ajax, is another popular tool that exposes DOM along with other techniques in retrieving data without having to reload the pages.

DOM offers to two levels of interface DOM Core to handle XML documents and DOM HTML, an extension of DOM Core to cover HTML documents in applications.

DOM Objects and Properties – Description and Purpose

1. DOMException object provides a placeholder for exceptions and their descriptions [2]. Its data structure is shown below:

exception DOMException {

unsigned short code;

};

The exception code addresses the type of error generated while parsing the XML document. Some of the errors and constants are provided below:

INDEX_SIZE_ERROR (=1) is generated when the index is negative, or greater than allowed value.

INVALID_STATE_ERR (= 11) is generated when an object that is no longer in existence is called.

SYNTAX_ERR (=12) is generated when an illegal or invalid string is specified.

INVALID_CHARACTER_ERR (=5) when an attempt is made to use an invalid character in the XML document string.

INVALID_MODIFICATION_ERROR (=13) is generated when the type of the object is changed in the application.

The above is a partial list of all the exception codes, which are 17. Access is through static call of the object, like, if(err == DOMException.INVALID_MODIFICATION_ERR).

2. Document object represents the entire HTML or XML document. It is the root of the document tree is a subclass of Node and provides the primary access to the data.

Document object attributes are as follows:

DocumentType doctypeDOMImplementation implementation

Element documentElementThe elements of the document object can be created using the method:

createElement( DOMString tagName). This method uses the XML tag object of type DOMString and raises DOMException when norms are violated.

getElementsByTagName(DOMString tagName) method provides a list of type NodeList, a collection of Element types. The input parameter is the DOMString object. This method does not raise any exception as any invalid input raises DOMString exception.

Conclusion

The explosion of web applications and their adoption by users has led to applications that need to handle data in an elegant and robust manner. The DOM standards were developed by W3C that enabled application developers to express document as data structure. The objects encapsulate the data and allow modification of the content through APIs, two of which are shown above. Further extensions of DOM objects are a certainty with future web applications demand sophistication and handle complexity in a secure manner.

[1].http://www.w3.org/TR/dom[2] http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/

WHAT OUR CURRENT CUSTOMERS SAY

  • Google
  • Sitejabber
  • Trustpilot
Zahraa S
Zahraa S
Absolutely spot on. I have had the best experience with Elite Academic Research and all my work have scored highly. Thank you for your professionalism and using expert writers with vast and outstanding knowledge in their fields. I highly recommend any day and time.
Stuart L
Stuart L
Thanks for keeping me sane for getting everything out of the way, I’ve been stuck working more than full time and balancing the rest but I’m glad you’ve been ensuring my school work is taken care of. I'll recommend Elite Academic Research to anyone who seeks quality academic help, thank you so much!
Mindi D
Mindi D
Brilliant writers and awesome support team. You can tell by the depth of research and the quality of work delivered that the writers care deeply about delivering that perfect grade.
Samuel Y
Samuel Y
I really appreciate the work all your amazing writers do to ensure that my papers are always delivered on time and always of the highest quality. I was at a crossroads last semester and I almost dropped out of school because of the many issues that were bombarding but I am glad a friend referred me to you guys. You came up big for me and continue to do so. I just wish I knew about your services earlier.
Cindy L
Cindy L
You can't fault the paper quality and speed of delivery. I have been using these guys for the past 3 years and I not even once have they ever failed me. They deliver properly researched papers way ahead of time. Each time I think I have had the best their professional writers surprise me with even better quality work. Elite Academic Research is a true Gem among essay writing companies.
Got an A and plagiarism percent was less than 10%! Thanks!

ORDER NOW

CategoriesUncategorized

Consider Your Assignments Done

“All my friends and I are getting help from eliteacademicresearch. It’s every college student’s best kept secret!”

Jermaine Byrant
BSN

“I was apprehensive at first. But I must say it was a great experience and well worth the price. I got an A!”

Nicole Johnson
Finance & Economics

Our Top Experts

See Why Our Clients Hire Us Again And Again!


OVER

10.3k
Reviews

RATING
4.89/5
Average

YEARS
13
Mastery

Success Guarantee

When you order form the best, some of your greatest problems as a student are solved!

Reliable

Professional

Affordable

Quick

Using this writing service is legal and is not prohibited by any law, university or college policies. Services of Elite Academic Research are provided for research and study purposes only with the intent to help students improve their writing and academic experience. We do not condone or encourage cheating, academic dishonesty, or any form of plagiarism. Our original, plagiarism-free, zero-AI expert samples should only be used as references. It is your responsibility to cite any outside sources appropriately. This service will be useful for students looking for quick, reliable, and efficient online class-help on a variety of topics.