* XML export of a lua table
@ 2017-02-23 12:50 Peter Rolf
2017-02-23 13:10 ` Hans Hagen
0 siblings, 1 reply; 3+ messages in thread
From: Peter Rolf @ 2017-02-23 12:50 UTC (permalink / raw)
To: mailing list for ConTeXt users
Hi,
what is the easiest way to export a lua table (mostly key-value pairs)
into a XML file? I found 'lxml.save', but no luck with a converter
function. Any help welcome.
Peter
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: XML export of a lua table
2017-02-23 12:50 XML export of a lua table Peter Rolf
@ 2017-02-23 13:10 ` Hans Hagen
2017-02-23 13:32 ` Peter Rolf
0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen @ 2017-02-23 13:10 UTC (permalink / raw)
To: ntg-context
On 2/23/2017 1:50 PM, Peter Rolf wrote:
> Hi,
>
> what is the easiest way to export a lua table (mostly key-value pairs)
> into a XML file? I found 'lxml.save', but no luck with a converter
> function. Any help welcome.
kind of obvious:
local t = { a = { b = 1 } }
inspect(table.toxml(t))
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: XML export of a lua table
2017-02-23 13:10 ` Hans Hagen
@ 2017-02-23 13:32 ` Peter Rolf
0 siblings, 0 replies; 3+ messages in thread
From: Peter Rolf @ 2017-02-23 13:32 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 23.02.2017 um 14:10 schrieb Hans Hagen:
> On 2/23/2017 1:50 PM, Peter Rolf wrote:
>> Hi,
>>
>> what is the easiest way to export a lua table (mostly key-value pairs)
>> into a XML file? I found 'lxml.save', but no luck with a converter
>> function. Any help welcome.
>
> kind of obvious:
>
> local t = { a = { b = 1 } }
>
> inspect(table.toxml(t))
>
Mhhh, tried that among others (always an empty XML document as result).
I guess I better start with only a small portion of the original table
(~560Kbyte as lua code).
Thanks for the pointer :D
>
> -----------------------------------------------------------------
> Hans Hagen | PRAGMA ADE
> Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -----------------------------------------------------------------
> ___________________________________________________________________________________
>
> If your question is of interest to others as well, please add an entry
> to the Wiki!
>
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage : http://www.pragma-ade.nl / http://context.aanhet.net
> archive : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___________________________________________________________________________________
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-02-23 13:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-23 12:50 XML export of a lua table Peter Rolf
2017-02-23 13:10 ` Hans Hagen
2017-02-23 13:32 ` Peter Rolf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).