2.Click File—>New—XML.

3.Select Create XML file from a DTD file.

4.Enter the folder to store the file. In this example is Generators.

5.Enter the XML file name. i.e. passengerList.xml. Click Next.

6.Click Select file from Workspace option.

7.From Workbench Files box, select passengerList.dtd. Click Next.

8.Select flight as root name.

9.Select Create required and optional content. Click Finish.

Figure 7-3 passengerList.xml

The second way to do it is using the context menu of the passengerList.dtd file:

1.Select passengerList.dtd.

2.Right-clickGenerate—>XML File

3.Enter the folder to store the file.

4.Enter passengerList.xml as file name. Click Next.

5.Select Flight as root element.

6.Select Create required and optional content. Click Finish.

7.2.2Create an XML file from an XSD file

There are two ways to create an XML file from a XSD file. The first one is using the Create XML File wizard: (See Figure 7-4.)

1.Open XML perspective if necessary.

2.Click File—>New—XML.

3.Select Create XML file from a XSD file.

4.Enter the folder to store the file. In this example it is Generators.

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

Page 164
Image 164
IBM Version 5 manual Create an XML file from an XSD file