[Freeswitch-users] LUA XML libraries
Alex Lake
alex at digitalmail.com
Thu Jun 13 19:35:03 MSD 2013
Excellent. Got that working. Not quite sure where to put it in the Wiki,
but some of the LuaXml documentation was a bit misleading (at least from
the POV of a Freeswitch developer).
I am on Ubuntu 12.04, so it was a simple case of:
apt-get install lua-5.1 luarocks (This will install a system-wide
lua which is never actually used, but keeps luarocks happy)
Then edit /usr/local/freeswitch/conf/autoload_configs/lua.conf.xml,
remove the commenting out of the following lines:
<param name="module-directory" value="/usr/lib/lua/5.1/?.so"/>
<param name="module-directory" value="/usr/local/lib/lua/5.1/?.so"/>
Then a lua script like the following will work:
require("LuaXml")
local xobj = xml.eval('<Cmd Message="Hello"/>')
freeswitch.consoleLog("INFO","The message in the XML is
"..xobj["Message"].."\n")
Easy when you know how, but I spent too long faffing around!
> I did use luaexpat but that was some time ago :
> http://matthewwild.co.uk/projects/luaexpat
>
> On Thu, Jun 13, 2013 at 2:22 PM, Alex Lake <alex at digitalmail.com
> <mailto:alex at digitalmail.com>> wrote:
>
> What LUA XML libraries are people currently using here?
>
> I'm interested in simply parsing and manipulating XML documents. Don't
> really need xpath or suchlike.
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org <mailto:consulting at freeswitch.org>
> http://www.freeswitchsolutions.com
>
>
>
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> <mailto:FreeSWITCH-users at lists.freeswitch.org>
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
>
>
> --
> Kind regards,
> /Areski
>
> ----
> Arezqui Belaid, <areski at gmail.com <mailto:areski at gmail.com>>
> Founder at Star2Billing (www.star2billing.com
> <http://www.star2billing.com>)
>
> Tel: +34650784355
> Twitter: http://twitter.com/areskib
> LinkedIn: http://www.linkedin.com/in/areski
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
>
>
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
> No virus found in this message.
> Checked by AVG - www.avg.com <http://www.avg.com>
> Version: 2012.0.2242 / Virus Database: 3199/5906 - Release Date: 06/12/13
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20130613/052fc26a/attachment.html
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users
mailing list