------------------------------------------ Different type of source/target structures ------------------------------------------ https://help.sap.com/docs/integration-suite/sap-integration-suite/creating-message-mapping-as-flow-step ----------------------------------- Things to consider when create XSD ----------------------------------- 1) minOccurs="0" ("0" is optional; without this is mandatory) 2) maxOccurs="unbounded" (Any elements that need to repeat should have maxOccurs) 3) type="xs:string" (Generally, value in xml node is just string. Use other than string if you need/must) ---------------------- Things you should know ---------------------- 1) Not all tools work the same. Different tool generate different XSD. 2) Some tool based on XML field value determine XSD data type 3) Some tool not set data type if XML field don't have value, some always set data type. 4) Some tool not adding minOccurs="0", some always add. 5) Most tool based on input xml node occurrence to determine maxOccurs="unbounded" ---------------------- Tools I recommended ---------------------- (1)Online tool: https://www.liquid-technologies.com/online-xml-to-xsd-converter Occurrence options = 'Relaxed' Type inference options = 'Relaxed' (2)IntelliJ IDEA: Menu: Tools | XML Actions | Generate XSD Schema from XML File Design type = Global elements / local types Detect simple content types = string Detect enumeration limit = 0 (3) Any other online tools, local software or automation/programming ways that you can generate your XSD the way you want. ------------------------------------------------------------- Useful groovy script for XSD (only use it if suit your need) ------------------------------------------------------------- XSD_Set_minOccurs_zero.groovy (Auto set minOccurs="0" for all elements.) XSD_Set_type_xs_string.groovy (Auto set type="xs:string" for all fields at leaf level.) XSD_Set_maxOccurs_unbounded.groovy (Auto set maxOccurs="unbounded" for all parent element that contains fields.)