Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a problem with xml file, i can't put two loops elements with group element.
Have you any idea how do this ?
My output file will be like this :
<?xml version="1.0" encoding="UTF-8"?>
<VendorFeed>
<MiraklVendors>
<MiraklVendor>
<MiraklShopId >1</MiraklShopId>
<DeliveryModes >
<DeliveryMode>
<Code>MP_LIVAHY</Code>
<Libelle>EDR</Libelle>
<DeliveryMode>
<DeliveryMode>
<Code>MP_LIVEXP</Code>
<Libelle>BZE</Libelle>
<DeliveryMode>
</DeliveryModes>
<RelayParcelMerchants>
<RelayParcelMerchant>
<Name>RELAIS_COLIS</Name>
<Key>RC1234</Key>
</RelayParcelMerchant>
<RelayParcelMerchant>
<Name>RELAIS_COLIS</Name>
<Key>RC56787</Key>
</RelayParcelMerchant>
</RelayParcelMerchant>
</RelayParcelMerchants>
</MiraklVendor>
<MiraklVendor>
<MiraklShopId >2</MiraklShopId>
<DeliveryModes >
<DeliveryMode>
<Code>MP_LIVSTD</Code>
<Libelle>ARE</Libelle>
<DeliveryMode>
<DeliveryMode>
<Code >MP_LIVEXP</Code>
<Libelle >BZE</Libelle>
<DeliveryMode>
</DeliveryModes>
<RelayParcelMerchants>
<RelayParcelMerchant>
<Name>RELAIS_COLIS</Name>
<Key>RC1234</Key>
</RelayParcelMerchant>
<RelayParcelMerchant>
<Name>RELAIS_COLIS</Name>
<Key>RC56787</Key>
</RelayParcelMerchant>
</RelayParcelMerchant>
</RelayParcelMerchants>
</MiraklVendor>
</MiraklVendors>
</VendorFeed>
Hi,
You can’t really create an XML with two loops. The only way I’ve been able to do similar is to construct the main XML with a single loop. Where the second loop is going to go, put a value you can easily replace, say @LOOP@. Then construct the second loop, replace the XML defn at the start of this, then, using tReplace to put the second loop into the main XML.
Messy, but it works.
Thanks
David.