ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  The State of JAXB: Availability, Suitability, Analysis, and Architecture
Subject:   java.beans.XMLEncoder/Decoder
Date:   2004-05-06 21:29:52
From:   jxtaboy
If you need an simple code-centric way to marshal and unmarshal Java objects to XML, you can use java.beans.XMLEncoder & XMLDecoder. These classes are meant to replace ObjectInputStream/ObjectOutputStream and they work virtually identically, in that they are able to encode/decode any JavaBean-compatible type. The downsides to this approach are that the XML is more bloated than it needs be, and interoperability is tougher due to the fact that no specific schema is generated for the bean. However, the DTD used by XMLEncoder can be found at http://java.sun.com/products/jfc/tsc/articles/persistence3/javabeans.dtd.

1 to 1 of 1
1 to 1 of 1