The UML to XML Schema mapping rules are as follows:
- Each UML class not derived from a built-in simple type (e.g. String) corresponds to an XML complex type.
- Each UML attribute of simple type (or derived from a simple type) corresponds to an XML attribute of the XML complex type defined by the containing UML class.
- Each UML attribute of a complex type is mapped to an XML element.
A consequence of this mapping is, that if a simple type can be switched from XML attribute to XML element representation by changing its UML presentation - being an UML attribute or association.
<?xml version="1.0" encoding="ISO-8859-1"?> <Service xmlns="uri://bw.ubs.com/map"> <Header UbsXmlStd="1.5" ServiceName="Util.GetInputForm" Entity="001" MsgLanguage="en" Timestamp="20031121101841802000" BusnResult="Y" MessageId="RQKEADUKNMWDLAMB" SessionId="SQKEADUKNMWDLAMB"> <Version Major="1" Minor="0" Patch="0"/> <SecurityContextList> <SecurityContext Index="0" UserType="1" UserId="t123797" SwSysId="XQ" AudTrailId="-" Location="CH" AuthnStrength="W" AuthnTimeStamp="" Channel="" Zone="-"/> <SecurityContext Index="1" UserType="2" UserId="XQ" SwSysId="XQ" AudTrailId="-" AuthnStrength="W" AuthnTimeStamp="-"/> </SecurityContextList> </Header> <Input> <Safe_Identification> <Account_Clearing_Number>0230</Account_Clearing_Number> <Agency_Code>00</Agency_Code> <Size_Code>04</Size_Code> <Safe_Status>1</Safe_Status> </Safe_Identification> </Input> </Service>
The definitions of more complex XML structures are defined in XML Schema Import Rules.
Overview
Content Tools