How do I read a JavaBean from an XML file using JOX?
Author: Deron Eriksson
Description: This Java tutorial describes how to read a JavaBean from an XML file using JOX (Java Objects in XML).
Tutorial created using: Windows XP || JDK 1.5.0_09 || Eclipse Web Tools Platform 1.5.1
(Continued from page 1)
If we execute our JoxReadJavaBeanFromFile class in EclipseSW, we see the following results:
As you can see, JOX lets you convert between JavaBeansW and XMLW with very little effort. It's not ideal for all data structures, but it is fantastic for relatively simple data.