xml2lua
xml2lua copied to clipboard
Relax tree:reduce to consider any node children other than those by #node
trafficstars
xmlhandler.tree parsing of ...
<?xml version="1.0" encoding="utf-8" ?>
<device>
T
<manufacturer>M</manufacturer>
</device>
... will reduce the manufacturer_node to {manufacturer = 'M'}. When reducing the device_node, it will have two children ({[1] = 'T', manufacturer = 'M'}) but #device_node will only count one so it will be reduced into the parent_node ({device = 'T'}).
This pull request fixes this problem.