Closed albrela closed 6 years ago
Hello manoel,
refering to the example in How-To-Use
If i try to use it and I have just one child in the node
local xml = [[ <people> <person type="P"> <name>Manoel</name> <city>Palmas-TO</city> </person> <!-- <person type="J"> --> <!-- <name>University of Brasília</name> --> <!-- <city>Brasília-DF</city> --> <!-- </person> --> </people> ]]
so I got this
Exception in thread "main" com.naef.jnlua.LuaRuntimeException: ...main.lua:41: attempt to index field '_attr' (a nil value)
Can you provide a solution for this?
Thank you for your attention.
Lars
The issue was not related to xml2lua module, but the way Lua handles tables and arrays. Check the updated How to Use section, which links to example1.lua.
Thank you for this.
Hello manoel,
refering to the example in How-To-Use
If i try to use it and I have just one child in the node
so I got this
Can you provide a solution for this?
Thank you for your attention.
Lars