![](https://secure.gravatar.com/avatar/46562c7d27388490d62e8d7a5bc960dd.jpg?s=120&d=mm&r=g)
On 5/1/2020 11:31 AM, Gerben Wierda wrote:
I’d like to travese the contents of an xml.collected() in a reverse order. I have
for connectionFromXML in xml.collected(viewFromXML,"/connection") do parseXMLConnection( rootFromXML, connectionFromXML, viewFromXML, rootFromOverrideXML) end
I tried:
local relationTable = xml.collected(viewFromXML,"/connection") for i=#relationTable, 1, -1 do connectionFromXML = relationTable[i] parseXMLConnection( rootFromXML, connectionFromXML, viewFromXML, rootFromOverrideXML) end
But apparently my lua knowledge is lacking (severely, I might say) as this ends with “attempt to get length of a function value“
it's an iterator
What is the correct way to do it? xml.all
----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------