Figure 7-5 HTML Documentation for passengerList.xsd

7.4 JavaBeans from DTD/XSD

WebSphere Studio Application Developer gives us several tools to quickly build applications. One of the tools is the generation of JavaBeans from an XML Schema or a DTD file, which allows you to code directly to instance rather than DOM APIs. This wizard:

￿Creates a bean for each element in DTD, XSD.

￿Creates a Factory bean for creation of a new XML document.

￿Creates a sample program for using the beans created.

To create the JavaBeans you need to have a container within Application Developer. This must be a project which could contain Java classes such as Web Project. To create a Web Project follow the next steps:

1.Click File—>New—>Project.

2.Select Web Project from Web category. Click Next.

3.Enter a project name, for example Travel.

4.Select J2EE Web Application Project. Click Next.

5.Create or select an Enterprise Application Project. Click Finish.

152 The XML Files: Development of XML/XSL Applications Using WebSphere Studio

Page 168
Image 168
IBM Version 5 manual JavaBeans from DTD/XSD, Click File-New-Project, Select J2EE Web Application Project. Click Next