Closed fordcars closed 4 years ago
Hi! I've been testing out this library, and I've been having trouble with a certain combination of tags:
<Game> <resources> <object> <path>myFirstPath</path> <path>mySecondPath</path> </object> </resources> </Game>`
Here, when parsed using xml2lua.parser(handler), I get an array like this:
xml2lua.parser(handler)
{ ["Game"] = { ["resources"] = { ["object"] = { ["path"] = { [1] = "myFirstPath", [2] = "mySecondPath" } } } }
... which is what I expected. However, when I simply put that array back into xml2lua.toXml(), I get the following output:
xml2lua.toXml()
<Game> <resources> <object> <1>myFirstPath</1> <2>mySecondPath</2> </object> </resources> </Game>
Is there anything I am doing wrong? Thank you!
Lua vesion. 5.3.2 System: Ubuntu 18.04.4 LTS
5.3.2
Ubuntu 18.04.4 LTS
Hello @fordcars Just fixed the issue. Thanks for reporting.
Try the new 1.4-1 version. It's in luarocks already.
Hi! I've been testing out this library, and I've been having trouble with a certain combination of tags:
Here, when parsed using
xml2lua.parser(handler)
, I get an array like this:... which is what I expected. However, when I simply put that array back into
xml2lua.toXml()
, I get the following output:Is there anything I am doing wrong? Thank you!
Lua vesion.
5.3.2
System:Ubuntu 18.04.4 LTS