Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.
Model XSD
XML schemas are modeled using UML Class diagrams. The XML Schema page of the Toolbox provides built-in support for the UML profile for XSD. This enables an abstract UML Class model to be automatically generated as a W3C XML Schema (XSD) file.
Access Diagram | Diagram Toolbox: More tools | XML Schema
How to
Step |
Action |
See also |
1 |
Create a package in the Project Browser.
|
|
2 |
Click on the New Diagram icon in the Project Browser.
|
|
3 |
Select UML Structural in the Select From field and Class in the Diagram Types field.
|
|
4 |
Click on the More tools option in the Toolbox and select XML Schema from the list of Toolboxes.
|
|
5 |
Click on the Schema icon from the Toolbox and drag it into the created Class diagram. When the New Diagram dialog is displayed, Select UML Structural in the Select From field and Class in the Diagram Types field to create a Class diagram.
|
|
6 |
Enterprise Architect creates a new XSDschema stereotyped package with a Class diagram under it. Open this Class diagram and use the constructs from the XML Schema Toolbox to model the XML Schema.
Alternatively: XML Schemas can also be modeled using the UML Profile for XSD.
|
Example
Name |
Diagram |
---|---|
Employee Details |
|
Notes
• | The UML attributes of the Classes map directly to XML elements or attributes |
• | Classes have no methods since there is no meaningful correspondence between Class methods and XSD constructs |
Modeling Restrictions:
The following XML Schema constructs cannot be modeled in Enterprise Architect:
• | appinfo |
• | field |
• | key |
• | keyref |
• | notation |
• | redefine |
• | selector |
• | substitutionGroup |
• | unique |