[Freeswitch-users] xml tags

Seven Du dujinfang at gmail.com
Tue Sep 25 20:14:21 MSD 2012


Yes, I understand it's valid json, and as in json there's a difference reference but in my special case I'm in erlang and using the erlydtl template and obviously conference.member.volume_in is valid but conference.member.input-volume is not.

Well, it's not a big deal and I can go over all and replace all '-'s to '_'s before rendering to the template.

Thanks. 

-- 
Seven Du
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)


On Tuesday, September 25, 2012 at 7:58 PM, Michael Jerris wrote:

> Typically we use _ for variables and - for params in config.  - is still valid in json, you just need to reference it differently.  Why would you do anything to modify them?
> 
> On Sep 11, 2012, at 12:30 PM, Seven Du <dujinfang at gmail.com (mailto:dujinfang at gmail.com)> wrote:
> 
> > Hi, 
> > 
> > in conference xml_list some tags has "_" but some use "-"
> > 
> > "_" works well but "-" causing problems e.g. when convert to json it's ok to use conference.last_talking but to get the input-volume value it has to be conference["input-volume"], and in some other cased there's no such work around and I have to go through all tags and replace "-"s to "_"s. 
> > 
> > I understand "-" in xml is totally valid but would it be better to keep it consistent ? 
> > 
> > <last_talking>0</last_talking> <energy>300</energy> <volume_in>0</volume_in> <volume_out>0</volume_out> <output-volume>0</output-volume> <input-volume>0</input-volume> <auto-adjusted-input-volume>0</auto-adjusted-input-volume>
> > 
> > 
> > Thanks.
> > 
> > -- 
> > Seven Du
> > Sent with Sparrow (http://www.sparrowmailapp.com/?sig)
> > 
> > _________________________________________________________________________
> > 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
> _________________________________________________________________________
> 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
> 
> 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20120926/7c9aa577/attachment-0001.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list