Class Generation
Now that you have some Zeus ready for use, it is time for a practical discussion. In this section and the rest of the chapter, sample code will be shown to demonstrate how Zeus works. For this example, I’ll demonstrate the use of Zeus with a standard web server deployment descriptor, web.xml. The sample application will read such a descriptor in and print out various data from the document. This may seem trivial, which is exactly the point.
Reading in a complex XML document and obtaining data from it becomes a trivial task instead of a large coding assignment. Furthermore, you will find it easy to customize the example to display descriptor information in a web application, a Swing GUI, or any other visual style you like.
Get Java & XML Data Binding now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.