XML Schema in UML

Altova UModel® includes a special diagram type and code generation support for XML Schema. The UModel XML Schema diagram renders XML Schema in a format similar to UML class diagrams, showing global elements as classes, and attributes in the attribute compartment. UML notes are used to display schema details.

xml schema in uml

You can create a UML project from an existing XML Schema through the Project menu by selecting the Import XML Schema option. The schema is treated as application source code and reverse-engineered to create a UModel project containing a modular representation on the XML Schema The XML Schema diagram features a special toolbar to provide easy access to XML Schema elements:

xml schema in uml

You can edit your XML Schema diagrams using the same visual editing tools available for other UML diagrams in your model. Changes made to the model are not implemented in the XSD file until the model is synchronized through the UModel Project menu.

UModel also supports round-trip engineering for XML Schema. If the schema is modified outside of UModel – such as in XMLSpy, the award-winning XML editor component of the Altova MissionKit – you can use the UModel Project menu to synchronize changes back to the UModel project and the XML diagram.

A single UModel application modeling project can include an XML Schema diagram to describe a data structure as well as UML class diagrams that generate code for dynamic functionality. You can include both the schema profile and a programming language profile in your project model tree.

Example: XML Schema & UML for Java

UModel's Include dialog allows you to add multiple profiles, enabling you to use XML Schema and your Java code in a single project.

xml schema in uml

Separate components allow you to assign XML Schema for XSD output and UML classes for Java output.

xml schema in uml

xml schema in uml

When you initiate code generation, UModel will write the XML Schema file and your Java source code files, which you can then compile and run as needed.