XML profile’s Data Elements tab
Use the Data Elements tab to define the elements and attributes in your Boomi Integration XML profile.
Elements and attributes have the configuration settings described below. If an element references a complex type or element declaration, it inherits many of its settings from that type or declaration. You cannot change those inherited settings on this tab.
General options
Use the following fields to identify and describe each element or attribute.
| Field | Description |
|---|---|
| Element Name | (Elements only) Enter the name of the element as it appears in the tree. The name must match the XML element name in your source or destination file. |
| Attribute Name | (Attributes only) Enter the name of the attribute as it appears in the tree. The name must match the XML attribute name in your source or destination file. |
| Namespace | Select the namespace for the element or attribute. Choose None or any namespace defined under Namespace Declarations. |
| Type Name | (Elements only) Select a complex type or element declaration. |
| Type Namespace | (Elements only) Displays the namespace for the selected complex type or element declaration. |
| Required | (Attributes only) Select this option to write the attribute when the element is written, even if the attribute is not mapped or does not have a value. |
| Comments | Enter a free-text description. |
Occurrence options
Use the following settings to control how looping and repeating elements are handled. Set these values for looping elements such as order line items or contacts within an account.
| Field | Description |
|---|---|
| Min Occurs (Minimum Occurrences) | Enter the minimum number of times the element can occur. |
| Max Occurs (Maximum Occurrences) | Enter the maximum number of times the element can occur. |
| Looping Option | Unique — Writes only unique instances. If two or more loops or segments are identical, only the first instance is written. Occurrence — Writes all instances. |
Use these guidelines to set the Min and Max Occurs values:
- For an optional element, set Min Occurs to
0and Max Occurs to1. - For a mandatory element, set Min Occurs to
1and Max Occurs to1. - For an optional looping element, set Min Occurs to
0and Max Occurs tounbounded. - For a mandatory looping element, set Min Occurs to
1and Max Occurs tounbounded.
Field Size Options
Use the following settings to define and validate the allowable length of an element or attribute value.
| Field | Description |
|---|---|
| Field Length Validation | Select whether to validate data on this element or attribute, including mandatory and length checks. Use this setting with the Cleanse step. |
| Minimum Length | Enter the minimum allowable length for the element or attribute value. |
| Maximum Length | Enter the maximum allowable length for the element or attribute value. |
Data Format Options
Use the following settings to define the data format for the element or attribute value.
| Field | Description |
|---|---|
| Data Type | Select the data type for the element or attribute. Choose Character (default), Number, or Date/Time. Select Number or Date/Time if your integration requires it. |
| Preserve Spaces | (Character Data Type only) Select this option to preserve leading and trailing spaces only for the elements in a Map component during mapping. By default, this option is not selected. |
| Number Format | (Number Data Type only) Enter a standard Java number formatting string to specify the format for the value. |
| Signed | (Number Data Type only) Select this option to include a byte in the value that indicates whether the value is positive or negative. |
| Implied Decimals | (Number Data Type only) In fixed-length legacy files, numeric values often do not include decimal points. Use this setting to determine decimal precision from an assumed number of decimal digits. The effect on a value depends on the context in which the profile is used. |
| Date Format | (Date/Time Data Type only) Enter or select the date/time format for the value. |
Preserve Spaces behavior
The behavior of the Preserve Spaces option depends on its state in the component XML:
| State | Value in component XML | Behavior |
|---|---|---|
| Selected | true | The Map component preserves spaces in the source or destination XML element. |
| Not selected | false | The Map component trims spaces in the source or destination XML element. If the element value contains only spaces, the child element is removed entirely after trimming. |
| Not explicitly set | null | The Map component continues to work as it did before you enabled the account feature. No change in behavior. If the account feature is enabled but you have not yet selected or unselected Preserve Spaces, the option is treated as null in the component XML, and the existing behavior continues unchanged. |
To apply the new behavior, actively select or unselect the option; only then the new value appears in the component XML. This applies to elements at both the source and destination in the Map component. Once enabled, this option cannot be reverted to a null state. To clear it for an element, use the Component API to update the element and remove the option from the payload.
Spaces preservation for attributes is unchanged; that behavior works as is. The Preserve Spaces option extends the same spaces preservation to XML elements. The checkbox also appears for attributes, but selecting it does not change how attributes behave; they continue to work as is.
Known limitations
-
Invalid character
DataFormats: If the component XML contains invalidDataFormatsfor the character datatype other than characterDataFormats, the Preserve Spaces feature does not work as expected. Fix any invalidDataFormatsfor the character data type before you enable or use this option. -
Copying XML profiles to accounts where the feature is not enabled: When you copy an XML profile that has Preserve Spaces configured to a destination account where the account feature is not enabled, the component XML is copied as-is. A banner notifies you that the component XML contains the new option. When you save, the component XML is updated, and the Preserve Spaces is set to
falsebecause the feature is not enabled in that account. To clear the state and set it back tonullfor an element, use the component API to update the element and remove the option from the payload.
For more information about formatting Number and Date elements, see Number data type and Date/Time data type.
Qualifiers
Use text qualifiers to identify values that you can use in instance identifiers. The table shows the Value and Description for each qualifier. Click a value to open the Edit Qualifier dialog and edit the Value and Description.
Click Remove next to a qualifier to remove it from the element or attribute. You must confirm this action.
Use the Actions menu to manage qualifiers:
- Add — Opens the Add Qualifier dialog. Enter a Value (required) and an optional Description, then save to add the qualifier to the element or attribute.
- Remove Selected — Removes the selected qualifiers from the element or attribute. Click OK to confirm or Cancel to abort.
- Remove All — Removes all qualifiers from the element or attribute. Click OK to confirm or Cancel to abort.
Constraints (legacy XML profiles only)
Constraints are available only in XML profiles created before the September 2013 release. For profiles created in September 2013 or later, use instance identifiers instead.
Use constraints to define a specific instance of an element when your XML document has multiple instances of the same element outside of a normal looping context. You can constrain by occurrence or by the value of the element or one of its child elements. Use the Add and Delete buttons to create or remove constraints for the element.
| Field | Description |
|---|---|
| Constraint Element | Select the element to constrain by. You can choose the element itself or one of its child elements or attributes. |
| Type | Value — Constrains the element by a specific text value. Occurrence — Constrains the element by its indexed position. |
| Value | Enter the text or number value to constrain by. |
Example
Suppose your XML looks like this:
...
<OrderNotes>
<Note type="specialInstructions">Ship line items immediately</Note>
<Note type="shipMethod">Ground</Note>
</OrderNotes>
...
To map to a specific Note element, you need a constraint on the type attribute. Define two Note elements in the tree, each with a type attribute. For the first, add a constraint: choose @type as the Constraint Element, select Value as the Type, and enter specialInstructions as the Value. Repeat for the second, entering shipMethod as the Value. The two Note elements then appear separately in the map for you to map to and from.
Namespace Declarations
Use namespace declarations to qualify an element with a prefix and avoid naming conflicts. Descendant elements can use the namespace declarations defined on an ancestor element.
For each namespace declared on the selected element, the table shows the URI, Prefix, and Comments as specified on the profile's Types tab.
- Select Default for a namespace declaration to associate all unprefixed elements in the document with that namespace. Apply the default namespace declaration to the root or another high-level element.
- Hover over a namespace declaration and click Delete to remove it from the element.
| Field | Description |
|---|---|
| Add Namespace Declaration | Opens the Choose Namespace dialog. Select a namespace to add a declaration for the selected element. All namespaces declared on the element or its ancestors are available for selection. |