In earlier examples in this chapter, you created elements and set values for attributes belonging to newly created elements. You can also access information already contained in the DOM and use it for additional purposes.
If you want to retrieve the information contained in the DOCTYPE declaration, you can access and process the properties of the DocumentType object. Listing 17.3 shows an example.
<?xml version='1.0'?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> <svg:svg xmlns:svg="http://www.w3.org/2000/svg" ...