xml2lua icon indicating copy to clipboard operation
xml2lua copied to clipboard

Relax tree:reduce to consider any node children other than those by #node

Open rtyle opened this issue 3 years ago • 0 comments
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.

rtyle avatar Mar 04 '22 18:03 rtyle