Chapter 23. Creating and Modifying XML Documents

In this chapter you'll be exploring what you can do with the Document Object Model (DOM) application program interface (API). As I outlined in the previous chapter, DOM uses a mechanism that is completely different to Simple API for XML (SAX). As well as providing an alternative mechanism for parsing XML documents, DOM also adds the capability for you to modify them and create new ones.

In this chapter you'll learn:

  • What a Document Object Model is

  • How you create a DOM parser

  • How you access the contents of a document using DOM

  • How you create and update a new XML document

  • How to modify Sketcher to read and write sketches as XML documents

Get Ivor Horton's Beginning Java™ 2, JDK™ 5th Edition 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.