forgottenserver/data/scripts/lib/xml.lua
2024-04-10 21:59:41 -06:00

18 lines
328 B
Lua

local boolTrue = {"1", "y", "Y", "t", "T"}
function tobool(str)
return str and table.contains(boolTrue, str:sub(1, 1))
end
function XMLNode.children(self)
local node = self:firstChild()
return function()
if not node then
return nil
end
local prevNode = node
node = node:nextSibling()
return prevNode
end
end