Generating for XML

When you generate XML from an OOM, PowerDesigner creates one XML file per package. The file contains the definition of each of the classes you select to generate in the Generation dialog box. You can select any of the classes from the model, including those that are contained within packages or sub-packages.

Navigable associations are migrated and generated as attributes although they do have their own definition in the object language file. Interfaces, operations, and links (dependencies, realizations and generalizations) are not included in the generated file.

To change the XML format type, you must change the object language for the model (by selecting Language > Change Current Object Language). You can create a new XML object language based on an existing one if you want to generate in another type of XML format that is not available in PowerDesigner.

The files generated are generated with the .xsd, .dtd or .xdr extension depending on the XML format specified. A generation log file is also created after generation.

  1. Select Language > Generate XML-language Code to open the Generation dialog box.
  2. Enter a destination directory for the generated files and, optionally, select the Check Model checkbox to verify the validity of your model before generation.
  3. Click the Selection tab and select the objects to include in the generation from the various sub-tabs.
  4. Click OK to generate XML files in the specified directory.