Import XSD

To reverse engineer a W3C XML Schema (XSD) file to create or overwrite a Package of your UML Class model, you can use the XML Schema Import facility.

Access    Project Browser | Click on target Package | Tools | XML Technologies | Import XSD, or
Project Browser | Right-click target Package | Code Engineering | Import XML Schema

Import Schema files



See also

Root Package

Displays the name of the selected Package.




Type in or browse for (click on ( ... )) the directory containing the source XSD file(s).



Selected File(s)

Lists the XML Schema(s) currently available for import.

·To select a single file, click on it
·To select several individual files ( Ctrl ) + click on each file
·To select a range of files, press ( Shift ) and select the first and last file in the range



Import global elements with "Type" postfix


Select this checkbox to treat the global element and the ComplexType it is referring to as two separate entities.

Global Element and ComplexType

Import referenced XML Schema(s)


Select this checkbox to import any XML Schema that is being referenced by any of the files selected in the Selected File(s) field.


Create Diagram for XML Schema(s)


Select this checkbox to create a Class diagram under each imported XSDschema Package.


Import XSD Elements/Attributes as

Select the appropriate radio button to indicate how the inline XSDelements and XSDattributes are to be imported into a Class, either as:

·UML Associations or
·UML attributes



Click on this button to begin the XSD import.




Click on this button to close the dialog, without saving your option selections.




Click on this button to display this Help topic




Displays system messages indicating the progress of the Schema import.

On imports containing a large number of external references, it can be useful to capture the progress messages to check exactly what has been imported. To do this, right-click on the messages and:

·Copy the selected messages to the clipboard (select the Copy Selected to Clipboard menu option)
·Copy all the messages to the clipboard (select the Copy All to Clipboard menu option), or
·Save all the messages to a file (select the Save to File menu option)




·If an XML Schema file being imported already exists in the model, Enterprise Architect skips importing the file
·References to XSD Primitive Types are always imported as UML attributes
·References to XSD constructs in external Schema files are always imported as UML attributes
·Enterprise Architect uses the schemaLocation attribute in the XSD Import and XSD Include elements of an XML Schema to determine the dependencies between the files; this attribute must be set to a valid file path (and not a URL) for the dependent XML Schema(s) to be imported correctly

Learning Center topics

·(Alt+F1) | Enterprise Architect | SOA and XML Engineering | XSD | Import XML Schema