
Doing That Drag Thang
by Antoine QuintFebruary 27, 2002
Introduction
As an XML application, SVG benefits from the Document Object Model. The DOM is an object-oriented API for reading from and writing to an XML document. Even if you've never heard of the DOM, you might have had some unfortunate experience with its wayward sibling, DHTML. DHTML really was the combination of HTML, CSS, JavaScript, and a DOM. What made DHTML such a headache is that the two main browser vendors had different DOMs, neither being compliant with the DOM as specified by the W3C. Recent versions of major browsers now support the W3C DOM Level 2, just like the Adobe SVG Viewer, which also offers support for the SVG DOM. If you need more formal introductions to the DOM, I would strongly suggest a bit of preparatory reading before delving into this article. The O'Reilly Network has some great articles by Scott Andrew LePera on scripting DOM Level 2 in an XHTML context (see parts one and two), and the W3C is the official source for the various DOM specifications.
