forgottenserver/data/scripts/lib/xml.lua

19 lines
328 B
Lua
Raw Permalink Normal View History

local boolTrue = {"1", "y", "Y", "t", "T"}
function tobool(str)
2024-04-10 23:59:41 -04:00
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