Traditionally, one area in which DOM has been quite weak is serialization, the outputting of an in-memory DOM Document object into a text file. In fact, it's even possible to use DOM to create Document objects that cannot be serialized as well- formed XML files. (For example, DOM allows an element to have attributes with the same namespace prefix but different namespace URIs.) Serialization has been left for vendor-specific classes such as Xerces' XMLSerializer . However, DOM Level 3 adds several classes for writing XML documents into files, onto the network, or anything else you can hook an OutputStream to.