[Freeswitch-dev] Building "as xml" to console

Michael Collins msc at freeswitch.org
Thu Oct 14 17:18:06 PDT 2010


Check out switch_xml.c. I think a good example of this might be "fifo
list_verbose". In mod_fifo.c approx line # 3644 it creates a new object of
type switch_xml_t using switch_xml_new(). I think you'll find some handy
things like adding xml child nodes, etc. Look in mod_fifo.c at the function
list_node() for an example of how you can use the included tools to build up
an XML structure. Then you can convert to text with switch_xml_toxml()
function. Search for this line in mod_fifo.c:

xml_text = switch_xml_toxml(x_report, SWITCH_FALSE);

The context around that line is a good example of using these objects,
printing them out and then safely freeing them from memory.

-MC

On Thu, Oct 14, 2010 at 2:33 PM, Eduardo Nunes Pereira <
eduardonunesp at gmail.com> wrote:

> Hi, friends
>
> there functions to do my xml output to console: example "tasks show the
> xml" and shows in xml, or have to build my output xml all manually ?
>
> Thanks
> _______________________________________________
> FreeSWITCH-dev mailing list
> FreeSWITCH-dev at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
> http://www.freeswitch.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20101014/67174294/attachment.html 


More information about the FreeSWITCH-dev mailing list