Tuesday, 13 August 2013

Lua - XML Parsing with LuaXML

Lua - XML Parsing with LuaXML

I am trying to parse the XML file with LuaXML
function customURLtoSteam64(web, sid)
local xml = require("luaXml")
local xfile =
xml.load("http://steamcommunity.com/id/GreenMarineValve?xml=1") --line189
local xscene = xfile:find("steamID64[1]")
return render_front(web, xscene)
end
But I get this error:
.\index.lua:189: attempt to index local 'xml' (a boolean value)
stack traceback:
.\index.lua:189: in function <.\index.lua:186>
(tail call): ?
(tail call): ?.\index.lua:189: attempt to index local 'xml' (a boolean value)
stack traceback:
c:\Lua\LuaRocks/share/lua/5.1/coxpcall.lua:24: in function
(tail call): ?
(tail call): ?
c:\Lua\LuaRocks/share/lua/5.1/orbit.lua:540: in function
(tail call): ?
(tail call): ?
I did not understand what is wrong, how can I correctly do that?

No comments:

Post a Comment