[英]Azure logic app - modify text before transform xml
I have a logic app which successfully calls a SOAP api and gets an XML string. 我有一个逻辑应用程序,可以成功调用SOAP api并获取XML字符串。
The XML encoding is flawed and in original form cannot be decoded by the built in Transform XML. XML编码有缺陷,并且内置的Transform XML无法以原始格式解码。
If I replace 'xmlns=' with 'xmlns:foo=' then the decoder works. 如果我将“ xmlns =”替换为“ xmlns:foo =”,则解码器将起作用。 My problem is implementing the replace function.
我的问题是实现替换功能。
I tried dynamic content in the logic app input and it successfully replaced the required text but also made undesired changes: • added an 'x' at beginning • \\r and \\n all over the place 我在逻辑应用程序输入中尝试了动态内容,它成功替换了所需的文本,但也进行了不需要的更改:•在开头添加了“ x”
How can replace the text cleanly? 怎样才能干净地替换文字?
@daniel - As @johns-305 suggested, first thing to take care of should probably be fixing that encoding issue so that your Transform XML can work properly . @daniel-正如@ johns-305所建议的那样,首先要解决的问题应该是解决编码问题,以便您的Transform XML可以正常工作 。
Here's great blog post by Logic Apps engineer on how to solve this type of issues: Support non-UTF payloads in Logic App with a conversion Azure Function 这是Logic Apps工程师撰写的精彩博客文章,内容涉及如何解决此类问题: 通过转换Azure功能支持Logic App中的非UTF有效负载
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.