
Chapter 5 Generating Objects from an OOM
Generating for XML
You can generate an XML DTD file from an OOM.
A DTD file provides an overall structure for an XML file. The DTD file can be used as a standard for validating data in XML files or for exchanging data in XML format.
You can generate an XML DTD in one of the following format types:
XML file format
XML - DTD
XML - Schema
XML - Data
Description
Used for standard DTD specification. Each class is generated as an ELEMENT, with its attributes as sub- elements. Each Attribute is generated as a PCDATA ELEMENT
Used for XML Schema specifications: Each class is generated as a <type>. Each attribute is generated as an <element>
Used for XML Data specification. Mapping is defined by the XOL specification
Navigable associations are migrated and generated as attributes, although they do have their own definition in the XOL file. You can specify a separate definition for a composition association.
Other objects such a interfaces, operations, and inheritance links are not included in the generated file.
Defining XML generation options
You can check a model before generation or simply generate directly. This generation option can be selected from the XML Generation dialog box.
ϖTo define XML generation options:
1Select Language➤ Generate XML.
The XML Generation dialog box opens.
2Click the Options tab.