Reading a existing XML file, parsing and outputting it sometimes still results in adding <_attr></_attr> instead of adding the attributes to the tag.
Example:
local xml = xml2lua.loadFile(xmlfile)
local parser = xml2lua.parser(handler)
parser:parse(xml)
print(xml2lua.toXml(handler.root))
In the input XML:
2
In the output XML:
2
<_attr>
static
</_attr>
vm.xml.gz