Раскроем все тайны работы с XML с помощью <foreach>.
<set xml = '
<root>
<row>
<cell>CELL</cell>
<cell>CELL</cell>
<cell>CELL</cell>
</row>
<row>
<cell>CELL</cell>
<cell>CELL</cell>
<cell>CELL</cell>
</row>
</root>
'>
<foreach name="x" data="<var[xml]>">
<foreach[x]._name> (<foreach[x]._count>):
<foreach name="y" data="<foreach[x]._text>">
<foreach[y]._name> (<foreach[y]._count>): <foreach[y]._text>
</foreach>
</foreach>
Обходить xml любой струкутуры, как оказывается, можно.
_name - Имя ноды
_text - Контент ноды
На выходе получим:
row (1):
cell (1): CELL
cell (2): CELL
cell (3): CELL
row (2):
cell (1): CELL
cell (2): CELL
cell (3): CELL
Профит.