Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.

Import XSD

The XML Schema Import facility is used to reverse engineer a W3C XML Schema (XSD) file as a UML Class model. An XSD file is imported into Enterprise Architect as a UML package. To import an XSD file, follow the steps below:

  1. In the Project Browser, right-click on the package to contain the imported XSD package. The context menu displays.
  2. Select the Code Engineering | Import XML Schema menu option. The Import XML Schema dialog displays.
  3. In the Directory field, click on the [ ... ] (Browse) button. The Select XML Schema(s) dialog displays.
  4. Click on the required input file. To select several individual files, press [Ctrl] as you click on each one. To select a range of files, press [Shift] and click on the first and last file in the range.
  5. Click on the Open button to return to the Import XML Schema dialog, which now shows the selected files in the Selected File(s) field.
  6. The Import global elements with "Type" postfix checkbox defaults to unselected to import a global element, and the ComplexType to which it refers, as a single ComplexType Class.
  7. The Import referenced XML Schema(s) checkbox defaults to selected, to import any other Schema file referenced by the selected input XML Schema file or files.


If an XML Schema file being imported already exists in the model, Enterprise Architect skips importing the file.

  1. The Create Diagram for XML Schema(s) checkbox defaults to selected, to display the imported elements on the diagram. If necessary, deselect the checkbox.
  2. For the Import XSD Elements/Attributes as: field, select the appropriate radio button to import elements and attributes in the XML Schema as:
  • UML Association connectors or
  • UML Class attributes.
  1. Click on the Import button to import the schema.
  2. The progress of the schema import is shown in the Progress status bar.


The Import XML Schema dialog can also be accessed for the active diagram by selecting the Project | XML Schema | Import XML Schema menu option.


Enterprise Architect uses the schemaLocation attribute in the Import and Include elements of an XML Schema to determine the dependencies between the files. Ensure that this attribute is set to a valid file path (and not a URL) for the dependent XML Schema(s) to be imported correctly.