Support

Account

Home Forums Add-ons Repeater Field Generate XML using sub_fields recursively Reply To: Generate XML using sub_fields recursively

  • Thanks for your code! But unfortunately it produce the following XML:

    <rooms>
    1
    </rooms>
    <floor>
    2
    </floor>
    <azaza>
    <0>
    <zaza>
    556
    </zaza>
    </0>
    <1>
    <zaza>
    557
    </zaza>
    </1>
    </azaza>
    <ololo>
    <0>
    <lola>
    558
    </lola>
    </0>
    </ololo>
    <level_1>
    <0>
    <level_2>
    <0>
    <level_3>
    559
    </level_3>
    </0>
    <1>
    <level_3>
    560
    </level_3>
    </1>
    </level_2>
    </0>
    </level_1>

    instead of:

    <rooms>
    1
    </rooms>
    <floor>
    2
    </floor>
    <azaza>
    <zaza>
    556
    </zaza>
    <zaza>
    557
    </zaza>
    </azaza>
    <ololo>
    <lola>
    558
    </lola>
    </ololo>
    <level_1>
    <level_2>
    <level_3>
    559
    </level_3>
    <level_3>
    560
    </level_3>
    </level_2>
    </level_1>

    What should I do to disable unnecessary <0>, <1>, etc. tags?