Having discussed the rationale for the file organization and element naming decisions in Chapter 2, we focus here on the basics of creating and writing out an XML document using the DOM.