title | description | services | documentationcenter | author | manager | editor | ms.assetid | ms.service | ms.workload | ms.tgt_pltfrm | ms.devlang | ms.topic | ms.date | ms.author |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Convert XML data with transforms - Azure Logic Apps | Microsoft Docs |
Create transforms or mapps to convert XML data between formats in logic apps by using the Enterprise Integration SDK |
logic-apps |
.net,nodejs,java |
msftman |
anneta |
cgronlun |
add01429-21bc-4bab-8b23-bc76ba7d0bde |
logic-apps |
integration |
na |
na |
article |
07/08/2016 |
LADocs; padmavc |
The Enterprise integration Transform connector converts data from one format to another format. For example, you may have an incoming message that contains the current date in the YearMonthDay format. You can use a transform to reformat the date to be in the MonthDayYear format.
A Transform, which is also known as a map, consists of a Source XML schema (the input) and a Target XML schema (the output). You can use different built-in functions to help manipulate or control the data, including string manipulations, conditional assignments, arithmetic expressions, date time formatters, and even looping constructs.
You can create a transform/map by using the Visual Studio Enterprise Integration SDK. When you are finished creating and testing the transform, you upload the transform into your integration account.
After you upload the transform/map into your integration account, you can use it to create a Logic app. The Logic app runs your transformations whenever the Logic app is triggered (and there is input content that needs to be transformed).
Here are the steps to use a transform:
- Create an integration account and add a map to it
Now that you've taken care of the prerequisites, it's time to create your Logic app:
-
Create a Logic app and link it to your integration account that contains the map.
-
Add the Transform XML action by first selecting Add an action
-
Enter the word transform in the search box to filter all the actions to the one that you want to use
-
Select the Transform XML action
-
Add the XML CONTENT that you transform. You can use any XML data you receive in the HTTP request as the CONTENT. In this example, select the body of the HTTP request that triggered the Logic app.
[!NOTE] Make sure that the content for the Transform XML is XML. If the content is not in XML or is base64-encoded, you must specify an expression that processes the content. For example, you can use functions, like
@base64ToBinary
for decoding content or@xml
for processing the content as XML. -
Select the name of the MAP that you want to use to perform the transformation. The map must already be in your integration account. In an earlier step, you already gave your Logic app access to your integration account that contains your map.
At this point, you are finished setting up your map. In a real world application, you may want to store the transformed data in an LOB application such as SalesForce. You can easily as an action to send the output of the transform to Salesforce.
You can now test your transform by making a request to the HTTP endpoint.
- The transformation created in a map can be simple, such as copying a name and address from one document to another. Or, you can create more complex transformations using the out-of-the-box map operations.
- Multiple map operations or functions are readily available, including strings, date time functions, and so on.
- You can do a direct data copy between the schemas. In the Mapper included in the SDK, this is as simple as drawing a line that connects the elements in the source schema with their counterparts in the destination schema.
- When creating a map, you view a graphical representation of the map, which shows all the relationships and links you create.
- Use the Test Map feature to add a sample XML message. With a simple click, you can test the map you created, and see the generated output.
- Upload existing maps
- Includes support for the XML format.