O'Reilly logo

Special Edition Using Java™ 2 Enterprise Edition by Mark Wutka

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using KBML to Serialize and Deserialize Java Beans

The Koala Bean Markup Language (KBML) writes beans to XML using a Java-specific format. Specifically, it writes out beans using a <bean> tag and writes bean properties using a <property> tag. Because KBML uses its own specific XML format, it isn't suitable for most XML data exchange. It makes an excellent serialization tool, however.

You can get the latest version of KBML from http://www-sop.inria.fr/koala/kbml/.

Listing 24.4 shows a program that writes a Person object out to an XML file using KBML.

Code Listing 24.4. Source Code for KoalaWrite.java
 package usingj2ee.xml; import java.io.*; import fr.dyade.koala.xml.kbml.*; public class KoalaWrite { public static void main(String[] args) { try ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required