[% USE xpath = XML.XPath(file => "./test.xml") %] [% FOREACH site = xpath.findnodes('site') %]

[% site.getAttribute('language') %]

[% FOREACH section = xpath.findnodes('site/section') %]

[% section.getAttribute('name') %]

[% maintext = section.findnodes('maintext') %] [% maintext.string_value %] [% END %] [% END %]