Lesson 17. The Document Object Model—2

In this lesson, you will see examples of using the Document Object Model to create, retrieve, and manipulate parts of XML documents.

In the examples in this chapter, you will use SVG, which was introduced in Chapter 15, “Presenting XML Graphically—SVG,” as an example of an XML application language. SVG has a number of extensions to the core XML DOM, but you won’t use any of those to manipulate the DOM. Our purpose is to demonstrate the properties and methods of the XML DOM Level 2 Core, all of which are available in SVG 1.0.

In each of the following examples, the programming language used is JavaScript because many Web developers already have some experience using it. Similar techniques can be applied using ...

Get Sams Teach Yourself XML in 10 Minutes now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.