我的azure BLOB存储帐户中有多个XML文件,它们都具有相同的格式,是否可以使用Logic App将它们全部连接到单个XML文件中?我尝试过使用concat,但它超过了104,857,600个字符的限制,所以我真的需要附加到现有的BLOB文件中,但我似乎只能选择创建/更新,这两个选项都会覆盖它。
例如,文件1可能如下所示:
<?xml version="1.0" encoding="utf-8"?>
<enfinity xsi:schemaLocation="http://www.intershop.com/xml/ns/enfinity/7.0/xcs/impex catalog.xsd http://www.intershop.com/xml/ns/enfinity/6.5/core/impex-dt dt.xsd" major="6" minor="1" family="enfinity" branch="enterprise" build="build" xmlns="http://www.intershop.com/xml/ns/enfinity/7.0/xcs/impex" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dt="http://www.intershop.com/xml/ns/enfinity/6.5/core/impex-dt">
<offer sku="123456777">
<custom-attributes>
<custom-attribute name="parentcolour" dt:dt="string" xml:lang="en-US">Green</custom-attribute>
<custom-attribute name="parentcolour" dt:dt="string" xml:lang="de-DE">Grün</custom-attribute>
</custom-attributes>
</offer>
</enfinity>而文件2可能如下所示:
<?xml version="1.0" encoding="utf-8"?>
<enfinity xsi:schemaLocation="http://www.intershop.com/xml/ns/enfinity/7.0/xcs/impex catalog.xsd http://www.intershop.com/xml/ns/enfinity/6.5/core/impex-dt dt.xsd" major="6" minor="1" family="enfinity" branch="enterprise" build="build" xmlns="http://www.intershop.com/xml/ns/enfinity/7.0/xcs/impex" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dt="http://www.intershop.com/xml/ns/enfinity/6.5/core/impex-dt">
<offer sku="123456">
<variations>
<mastered-products>
<mastered-product sku="123456777" domain="WhiteStuff-MasterRepository"/>
<mastered-product sku="123456888" domain="WhiteStuff-MasterRepository"/>
</mastered-products>
</variations>
</offer>
</enfinity>我知道一个有<custom-attributes>,另一个有<variations>,但需要追加的是<offer sku=>块,所以整个文件应该是这样的:
<?xml version="1.0" encoding="utf-8"?>
<enfinity xsi:schemaLocation="http://www.intershop.com/xml/ns/enfinity/7.0/xcs/impex catalog.xsd http://www.intershop.com/xml/ns/enfinity/6.5/core/impex-dt dt.xsd" major="6" minor="1" family="enfinity" branch="enterprise" build="build" xmlns="http://www.intershop.com/xml/ns/enfinity/7.0/xcs/impex" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dt="http://www.intershop.com/xml/ns/enfinity/6.5/core/impex-dt">
<offer sku="123456777">
<custom-attributes>
<custom-attribute name="parentcolour" dt:dt="string" xml:lang="en-US">Green</custom-attribute>
<custom-attribute name="parentcolour" dt:dt="string" xml:lang="de-DE">Grün</custom-attribute>
</custom-attributes>
</offer>
<offer sku="123456">
<variations>
<mastered-products>
<mastered-product sku="123456777" domain="WhiteStuff-MasterRepository"/>
<mastered-product sku="123456888" domain="WhiteStuff-MasterRepository"/>
</mastered-products>
</variations>
</offer>
</enfinity>如果有帮助,出现在一个文件中的SKU将永远不会出现在单独的文件中。
发布于 2021-09-24 17:50:55
基于您的共享需求,我复制了相同的内容,以下是它在我身上的工作方式:
我从存储中检索了blob >添加了Compose Connector with json function >,然后将其解析为json >,然后使用定制的json将其合并为一个,并相应地添加值
以下是流程的屏幕截图,供您参考:



最后,您需要再次将变量转换为XML,以获得所需的格式
https://stackoverflow.com/questions/69292591
复制相似问题