We should create a generic xml input reader, which traverses the input xml and creates a similar object model out of it.
Example:
<root>
<test attr="abc"/>
</root>
<#list root.testList as test>
${test.@attr}
</#list>
The first "simple" variable access should be only available if the document declares only one <test>
node as in the example. But you might also imagine to have a document like this:
<root>
<test attr="abc"/>
<test attr="efg"/>
</root>
As we do not know the schema definition of the input xml, we do not know whether we should provide a list of nodes or a single variable path for the node access. So in general we should provide a list for every node besides the root node to be as generic as possible.