简体   繁体   中英

azure logic app how to change data in xml doc

Learning azure logic apps...I successfully decoded an X12 EDI message using 'transform XML'. The problem is I need to change element data in in the resulting XML (AFTER the mapping). As an example, XML element 'ISA06' will have data changed from 'DNE' to "ABC".

How can I parse an XML document, find an element and change its value?

Much appreciated for insight.

Just in case anyone is curious, in logic APPS I found a 'data operations' connector with operations 'compose', 'parse', and 'transform'. In essence, the messages are transformed into JSON objects for manipulation.

I took the original message, composed it to json and parsed it...same for the decoded XML X12 820 message. This created dynamic elements for each message allowing me to use 'transform' to recreate the decoded XML X12 820 message with updated data.

If someone has a more elegant solution, please give insight... I would still like to do this through XML only. ...because parsing the messages required manually creating the JSON schemas for each message.

The easiest is use XSLT maps as in BizTalk. You can develope a map in Visual Studio though Microsoft Azure Logic Apps Enterprise Integration Tools for Visual Studio 2015 2.0 and then you can add your maps into your Azure Enterprise Integration Account, see https://github.com/MicrosoftDocs/azure-docs/blob/master/articles/logic-apps/logic-apps-enterprise-integration-maps.md

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM