Processing Xml With Java - A Guide To Sax, Dom, Jdom, Jaxp, And Trax Free Open Book

Processing Xml With Java - A Guide To Sax, Dom, Jdom, Jaxp, And Trax

Previous Section Next Section

The Evolution of DOM

The first version of DOM, sometimes called DOM Level 0, wasn't an official specification but merely the object model that Netscape Navigator 3 and Internet Explorer 3 browsers implemented. (These were actually two different object models only marginally compatible with each other.)

DOM Level 0 applied only to HTML documents and only in the context of JavaScript. Nonetheless, both the usefulness of JavaScript and the growing incompatibility between the two browser object models underscored the need for something more standard. Hence, the W3C launched the W3C DOM Activity and began work on DOM Level 1. DOM1 was an attempt to devise a specification as quickly as possible that would codify existing practice and also achieve some level of compatibility across browsers. Given the constraints under which the working group labored, DOM1 is a surprisingly good specification. Although the naming conventions feel wrong to a Java developer, DOM1 does provides a solid core of functionality that covers maybe 75 percent of what developers want to do when processing XML.

DOM Level 2 cleaned up the DOM1 interfaces. The big change was namespace support in the Element and Attr interfaces. In addition, DOM2 added a number of supplementary interfaces for events, traversal, ranges, views, and stylesheets. I'll address these in upcoming chapters. In 2002, all significant XML parsers that support DOM support DOM2. There's not a lot of reason to worry about the difference between DOM1 and DOM2. From this point forward, I'm just going to teach DOM2.

DOM Level 3 is visible not far up the road. Parts of it are just beginning to be supported by bleeding-edge parsers, most especially Xerces 2. In the core, DOM3 just adds a few missing pieces needed to allow DOM to fully support all XML Information Set (Infoset) properties. This includes the original encoding and base URI of the document. However, DOM3 will also provide some crucial functionality missing from DOM2. In particular, DOM2 doesn't provide a parser-independent means to create a new Document object, either by parsing a file or by building one from scratch in memory. DOM3 will provide standard ways of doing both. DOM3 will also add a lot more support for DTDs and schemas. But despite all its new features and functionality, DOM3 will not replace DOM2. Everything that works today in DOM2 will continue to work the same way in DOM3. DOM3 extends the DOM into new territory, but it doesn't change what has gone before it.

    Previous Section Next Section


         Main Menu
    Main Page
    Table of content
    Copyright
    Praise for Elliotte Rusty Harold's 'Processing XML with Java™'
    List of Examples
    List of Figures
    Preface
    Part I: XML
    Part II: SAX
    Part III: DOM
    Chapter 9. The Document Object Model
    The Evolution of DOM
    DOM Modules
    Application-Specific DOMs
    Trees
    DOM Parsers for Java
    Parsing Documents with a DOM Parser
    The Node Interface
    The NodeList Interface
    JAXP Serialization
    DOMException
    Choosing between SAX and DOM
    Summary
    Chapter 10. Creating XML Documents with DOM
    Chapter 11. The DOM Core
    Chapter 12. The DOM Traversal Module
    Chapter 13. Output from DOM
    Part IV: JDOM
    Part V: XPath/XSLT
    Part VI: Appendixes


    More Books
    PHP Hacks
    Processing Xml With Java - A Guide To Sax, Dom, Jdom, Jaxp, And Trax
    The Koran (Holy Qur'an)
    Macromedia Flash 8 Bible
    Search Engine Optimization for Dummies
    YouTube Traffic
    PHP 5 for Dummies
    Harry Potter and The Chamber of Secrets
    Harry Potter and the Sorcerer's Stone
    The Pilgrim's Progress
    Wireless Hacks
    Flash Hacks. 100 Industrial-Strength Tips & Tools
    PayPal Hacks. 100 Industrial-Strength Tips and Tools
    Amazon Hacks
    Pdf Hacks
    The Da Vinci Code
    Google Hacks
    The Holy Bible
    Windows XP For Dummies
    Harry Potter and the Half-Blood Prince
    Seo Book
    Upgrading and Repairing Networks
    Macromedia Dreamweaver 8 UNLEASHED
    Windows XP Annoyances
    Windows XP Hacks
    Microsoft Windows XP Power Toolkit
    Teach Yourself MS Office In 24Hours
    iPod & iTunes Missing Manual
    PC Hacks 100 Industrial-Strength Tips and Tools
    PC Overclocking, Optimization, and Tuning - 2th Edition
    PC Hardware In A Nutshell 3rd Edition
    PC Hardware in a Nutshell, 2nd Edition
    Upgrading and Repairing PCs
    Google for Dummies
    MySQL Cookbook
    Teach Yourself Macromedia Flash 8 In 24 Hours
    PHP CookBook
    Sams Teach Yourself JavaScript in 24 Hours
    PHP5 Manual
    Free Games Paper Airplanes
    500 Juegos Gratis 500 Giochi Gratis 500 Jeux Gratuits 500 Jogos Gratis 500 Kostenlose Spiele