Modifying Incoming and Outgoing XML Data Overview

Lines drawn from source to target elements in a transaction map represent a movement of data. At times, your trading partners might define data in a format different than how Eclipse can store it or the data in Eclipse might not be in a format your trading partner can understand. For example, you might have a trading partner that defines dates using the mm/dd/yy format, where Eclipse stores dates using the mm/dd/yyyy format; or you might have a trading partner that defines the unit of measure of each as "each," but Eclipse stores the same unit of measure as "ea".

To process XML transactions successfully, modify this type of data to match the required format. The system translates the data to the new format before saving it or sending it. You can manipulate each target element of a transaction for both the received document map and the sent document map using operations such as concatenation, adding, subtracting, and table-based conversions.

You can also add sources, such as literal statements to help identify data. For example, you might store e-mail addresses and other information in the Internal Notes field of an order. To better identify data stored and displayed in the field, you can concatenate a literal statement, such as Email: to the incoming data address.

Using a combination of sources and operations, you can create a stacked operation to modify any XML data, even if the element does not have source data mapped to it.

You can add the following sources to an expression:

Source

Description

Literal

Adds a text string to the XML data. For example, you can store e-mail addresses and other information in the Internal Notes field of an order. To better identify data stored and printed in the field, add literal statements to identify the data.

New Line

Inserts a line break in the XML data, for better readability.

You can add the following operations to an expression:

Operation

Description

Concatenate

Links or joins data together. For example, if you are mapping several pieces of data to the Internal Notes field of an order, link the data together to form a valid expression.

Substring

Copies one part of a string, and assigns it to a variable or element. For example, you can extract the first four digits of a credit card number to identify the bank. If the string of data contains delimiters, you can also use the extract field operation.

Extract fields

Extracts data from a substring of data separated by delimiters into numbered field names. For example, if you have a string of three values separated by a comma (the delimiter), and you need to save the middle value, use the extract field operation to indicate which field within the delimited string you want to save.

Table-based conversions

Converts data from one format to another. For example, your trading partner might use the unit of measure of "each." Eclipse stores units of measure as two characters. Using a table-based conversion, you can tell the system to change the unit of measure "each" to "ea" for incoming data, and to change "ea" to "each" for outgoing data.

Decimal conversions

Tells the system how many decimal places to use in numeric values. Use decimal conversions if your trading partner sends dollar amounts or other numbers in a format that does not contain decimals in the actual data.

Date conversions

Converts dates into different formats. For example, your trading partner sends date information using the mm/dd/yy format, but Eclipse stores dates using the mm/dd/yyyy format. Define a date conversion operation to convert the format of the date element.

Mathematical operations

Adds, subtracts, multiplies, divides, or sums amounts within XML data.

Encode or decode Base64

Encodes or decodes Base64 data. Use this type of encoding to preserve special characters that you might receive or send using XML.

Note: Base64 encoding does not encrypt data.

Extract current date and time

Extracts the date and time the transaction was received or sent. Use this operation to extract all or a portion of a date or time stamp.

Inversion

Divides a number into 1, making a reciprocal. For example, if you received the number 42, assigning this operation changes the number to 1/42.

Uppercasing and lowercasing letters

Uppercases or lowercases letters in a string of XML data.

 

XPath selection

 

Defines an if-then-else operation for XML data that identifies the element to use instead of another element if the correct conditions exist.

Repeating group selection

Defines an if-then-else operation for XML data that identifies one specific piece of data within an XML repeating element.

Logical If-Then-Else

Defines a basic if-then-else operation for XML data. For example, use this logical expression type to define a condition in which you would need to change data.

See Also:

Creating XML Transaction Maps

Building Modification Expressions for XML Data