简体   繁体   English

为什么逻辑应用程序中的转换 xml 组件不显示 XML 作为输出

[英]why transform xml component in logic app doesn't show XML as output

Why transform XML component in logic app doesn't show XML as output?为什么逻辑应用程序中的转换 XML 组件不会将 XML 显示为输出? When I create my logic app for receiving EDI 850 x12 message.当我创建用于接收 EDI 850 x12 消息的逻辑应用程序时。 I use decode x12 component in the logic app workflow then I used transform XML.我在逻辑应用工作流中使用了 decode x12 组件,然后我使用了转换 XML。 There I gave input as XML with the Workflow definition language "@xml(base64ToBinary(item()?['Payload']))" for this I get output as在那里,我使用工作流定义语言“@xml(base64ToBinary(item()?['Payload']))”将输入作为 XML 输入,我得到的输出为

在此处输入图片说明

But I need output as XML.但我需要输出为 XML。 Please help me fix this issue.请帮我解决这个问题。

Thanks in advance提前致谢

Not sure what the name of your mapping action is, but if what you need is the output XML as a string, then try this: "@base64ToString(body('<<Your_Mapping_Action>>')?['$content'])"不确定你的映射操作的名称是什么,但如果你需要的是输出 XML 作为字符串,那么试试这个: "@base64ToString(body('<<Your_Mapping_Action>>')?['$content'])"

As you could see, XML objects in Logic Apps are always base64 encoded.如您所见,逻辑应用中的 XML对象始终采用 base64 编码。

HTH HTH

i used compose component to pass output of transform XML using "@join(outputs('Compose'),';')" and i added Parse JSON component in logic app workflow with schema我使用 compose 组件使用“@join(outputs('Compose'),';')”传递转换 XML 的输出,并且我在逻辑应用程序工作流中添加了 Parse JSON 组件与架构

{"properties": {"?xml":{"properties":{"@@encoding":{"type": "string"}, "@@version":{"type": "string"}},"type": "object"},"ns0:Root":{"properties":{ "@@xmlns:ns0":{"type": "string"},"PODate":{"type": "string"},"PONumber": {"type": "string"},"RetailerID":{"type": "string"}},"type": "object"}},"type":"object"} {"properties": {"?xml":{"properties":{"@@encoding":{"type": "string"}, "@@version":{"type": "string"}}, "type": "object"},"ns0:Root":{"properties":{ "@@xmlns:ns0":{"type": "string"},"PODate":{"type": "string "},"PONumber": {"type": "string"},"RetailerID":{"type": "string"}},"type": "object"}},"type":"object"}

There my SCHEMA wasn't correct and i added above schema in parse JSON to get output to insert row.我的 SCHEMA 不正确,我在解析 JSON 中添加了上面的模式以获取输出以插入行。 Thanks谢谢

You can now use string().您现在可以使用 string()。 String() will convert the binary output to a string. String() 将二进制输出转换为字符串。

So your expression would be:所以你的表达是:

string(item()?['Payload'])

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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