Salesforce

Flat Data View - Mapping Rules (Magic xpa 3.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

Flat Data View – Mapping Rules (Magic xpa 3.x)

This section describes data mapping rules between XSD data types and Magic xpa data types.

Repeatable Elements (MaxOccurs)

Simple elements with maxOccurs > 1 (including “unbounded”) are considered to be compounds with one simple element, even if they are not compound, since they cannot be spread horizontally as with bounded simple elements. Each vector, even if simple, will never start in the record of its parent.

anyType Elements

The anyType elements are mapped as BLOB fields. When loading an XML, the content of the element is loaded into the view. When writing the XML, any value modified in that field are written as-is to the XML.

HexBinary, Base64Binary

HexBinary and Base64 Binary are automatically converted from/to binary content, when loading/serializing the XML into/from the view.

Date and Time Data Types

The XSD type date is read and written to an XML using the XML schema’s format YYYY-MM-DD, regardless of the ‘display picture’ selected for the field (in the ‘xml defaults’ or in the Studio).

Likewise, the XSD type time is read and written to the XML using the XML schema’s format HH:MM:SS.
Note: To access the optional milliseconds and time zone, developers need to change the attribute to ‘Alpha’, in the Studio, before loading the XML.

The types gYear, gDay and gMonth, each consisting of one singular numeric value, automatically support Numeric attributes (of Magic xpa) in the Studio:

  • When loading an XML, the numeric value is parsed from the XML into the flat-view (e.g., for a gMonth’s value ‘--10--‘, the flat-view field will contain the numeric value 10).

  • When modifying a value in the ‘flat-view’, the numeric value is formatted to the XML according to the format of the schema (e.g. 11 -> ‘--11--‘).

All date and time types (including date, time, gYear, gDay & gMonth) allow Alpha attributes (of Magic xpa), in which case the flat-view field will contain the entire content (e.g. ‘--10--‘ for gMonth). This lets the developer modify it without any restriction (taking into account that modifying the value not according to the format, e.g. ‘-10-‘, will result in an invalid XML).

Creation of Complex Elements

When creating a record in an XML data source, a complex element that has no attributes or simple elements (and is part of a complex type of 'All' or 'Sequence') will automatically be created. This removes the need of defining an additional XML view for that complex element.

Reference
Attachment 
Attachment