What Is DOM, Anyway?
The Document Object Model (DOM) provides a way of representing an XML document in memory so that it can be manipulated by your software. DOM is a standard applica-tion programming interface (API) that makes it easy for programmers to access elements and delete, add, or edit content and attributes. DOM was proposed by the World Wide Web Consortium (W3C) in August of 1997 in the User Interface Domain. The Activity was eventually moved to the Architecture Domain in November of 2000. Here’s a good place to start looking for DOM-related information:
Any number of organizations provide implementations in accordance with the DOM specification. An implementation is a complete set of APIs for a given programming lan-guage that supports the DOM specification. You might suspect that commercial software vendors would sell DOM implementations, but it turns out that there are several open-source and freely available implementations. These implementations are well docu-mented and of high quality. They are commonly used in production software with very good results. This is a result of a well-written specification by W3C. Due to the availabil-ity of high-quality free implementations, few if any implementations are sold for profit. We will look at some of these implementations along with sample code throughout this chapter.