<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">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).<br>
<br>
I am on Ubuntu 12.04, so it was a simple case of:<br>
<br>
apt-get install lua-5.1 luarocks (This will install a
system-wide lua which is never actually used, but keeps luarocks
happy)<br>
<br>
Then edit
/usr/local/freeswitch/conf/autoload_configs/lua.conf.xml, remove
the commenting out of the following lines:<br>
<param name="module-directory"
value="/usr/lib/lua/5.1/?.so"/><br>
<param name="module-directory"
value="/usr/local/lib/lua/5.1/?.so"/><br>
<br>
Then a lua script like the following will work:<br>
<br>
require("LuaXml")<br>
local xobj = xml.eval('<Cmd Message="Hello"/>')<br>
freeswitch.consoleLog("INFO","The message in the XML is
"..xobj["Message"].."\n")<br>
<br>
Easy when you know how, but I spent too long faffing around!<br>
<br>
</div>
<blockquote
cite="mid:CAMf7LBg-r51Tgs92aPvBm_wyekJixQr8-tAfg5jSMH=dM7vRAA@mail.gmail.com"
type="cite">I did use luaexpat but that was some time ago :
<div><a moz-do-not-send="true"
href="http://matthewwild.co.uk/projects/luaexpat">http://matthewwild.co.uk/projects/luaexpat</a><br>
<br>
<div class="gmail_quote">On Thu, Jun 13, 2013 at 2:22 PM, Alex
Lake <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:alex@digitalmail.com" target="_blank">alex@digitalmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">What LUA
XML libraries are people currently using here?<br>
<br>
I'm interested in simply parsing and manipulating XML
documents. Don't<br>
really need xpath or suchlike.<br>
<br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a moz-do-not-send="true"
href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a moz-do-not-send="true"
href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a moz-do-not-send="true" href="http://www.cudatel.com"
target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a moz-do-not-send="true" href="http://www.freeswitch.org"
target="_blank">http://www.freeswitch.org</a><br>
<a moz-do-not-send="true" href="http://wiki.freeswitch.org"
target="_blank">http://wiki.freeswitch.org</a><br>
<a moz-do-not-send="true" href="http://www.cluecon.com"
target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a moz-do-not-send="true"
href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a moz-do-not-send="true"
href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users"
target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a moz-do-not-send="true"
href="http://lists.freeswitch.org/mailman/options/freeswitch-users"
target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a moz-do-not-send="true" href="http://www.freeswitch.org"
target="_blank">http://www.freeswitch.org</a><br>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
Kind regards,<br>
/Areski<br>
<br>
----<br>
Arezqui Belaid, <<a moz-do-not-send="true"
href="mailto:areski@gmail.com" target="_blank">areski@gmail.com</a>><br>
Founder at Star2Billing (<a moz-do-not-send="true"
href="http://www.star2billing.com" target="_blank">www.star2billing.com</a>)<br>
<br>
Tel: +34650784355<br>
Twitter: <a moz-do-not-send="true"
href="http://twitter.com/areskib" target="_blank">http://twitter.com/areskib</a>
<br>
LinkedIn: <a moz-do-not-send="true"
href="http://www.linkedin.com/in/areski" target="_blank">http://www.linkedin.com/in/areski</a>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
<a class="moz-txt-link-abbreviated" href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitchsolutions.com">http://www.freeswitchsolutions.com</a>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
<a class="moz-txt-link-freetext" href="http://www.cudatel.com">http://www.cudatel.com</a>
Official FreeSWITCH Sites
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://wiki.freeswitch.org">http://wiki.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://www.cluecon.com">http://www.cluecon.com</a>
FreeSWITCH-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
UNSUBSCRIBE:<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a>
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<p class="" avgcert""="" color="#000000" align="left">No virus
found in this message.<br>
Checked by AVG - <a moz-do-not-send="true"
href="http://www.avg.com">www.avg.com</a><br>
Version: 2012.0.2242 / Virus Database: 3199/5906 - Release Date:
06/12/13</p>
</blockquote>
<br>
</body>
</html>