Is there a way to serialize an object as an XML document?
Location: http://www.jguru.com/faq/view.jsp?EID=79287 Created: Jun 18, 2000 Modified: 2000-06-18 00:58:13.512 Author: John Zukowski (http://www.jguru.com/guru/viewbio.jsp?EID=7) Question originally posed by Daniel Jutzi (http://www.jguru.com/guru/viewbio.jsp?EID=43200 The Java serialization mechanism uses an efficient, compact format for encoding information about class structure and the values for instance variables. The eXtensible Markup Language (XML) provides a text-based approach for encoding structured data, and could also be used to encode the serialization information, albeit in a much less compact but more readable format. It should come as no surprise that this approach is being investigated to determine if it is appropriate under certain circumstances. The reference at the end of this answer provides a link to an article by Philip Milne and Kathy Walrath at The Swing Connection which illustrates such a technique by defining a persistence model which writes object graphs as X