Page 1 of 1

How to use loop in a loop XML

Posted: Fri Aug 17, 2018 6:27 pm
by Bartolomeu_9000
Hello,
I need to set a second loop in XML Feed in order to gather all relative data <ARTICLE> under the parent data <PRODUCT>.
First loop is set to pull all parent data from the web.
Second loop doesnt work and would appreciate your advice how should I set it up?

1) This is the loop that works:
<PRODUCTDATA type="full">
{each type="product"}
<PRODUCT>
<P_NR>{sku|parent}</P_NR>
(...)
2) Than later within I need to collect all articles under assigned product - and it doesnt work:
<ARTICLEDATA type="full">
{each type="article"}
<ARTICLE>
<A_NR>{sku}</A_NR>
(...)
3) Closure of both loopes:
{/each}
</ARTICLE>
</ARTICLEDATA>
</PRODUCT>
{/each}
</PRODUCTDATA>

Please, could you help me?
I`ve no clue (and not an expert at all).

Re: How to use loop in a loop XML

Posted: Mon Aug 20, 2018 9:35 am
by Radu
Hi,

This is a forum for users of the Oxygen XML Editor application.
We occasionally help people who use XSLT stylesheets to process XML documents but in your case you seem to use some kind of PHP-based template engine and we do not have experience with this.

Regards,
Radu

Re: How to use loop in a loop XML

Posted: Mon Aug 20, 2018 2:01 pm
by Bartolomeu_9000
Hi Radu,

Thank you for your answer.

Best regards,
Bartosz