Hi, when I defin the xml string like below, and attempt to get person's name, it's return a nil value.
I found it occured only has one person in the list of people.
`
local xml =
[[
University of BrasíliaBrasília-DF
]]
local xml2lua = require("xml2lua")
local handler = require("xmlhandler.tree")
local parser = xml2lua.parser(handler)
parser:parse(xml)
for i, p in pairs(handler.root.people.person) do
print(i, "Name:", p.name, "City:", p.city, "Type:", p._attr.type)
end
`
Hi, when I defin the xml string like below, and attempt to get person's name, it's return a nil value. I found it occured only has one person in the list of people. ` local xml = [[
]] local xml2lua = require("xml2lua") local handler = require("xmlhandler.tree") local parser = xml2lua.parser(handler) parser:parse(xml) for i, p in pairs(handler.root.people.person) do print(i, "Name:", p.name, "City:", p.city, "Type:", p._attr.type) end `