ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Peter Rolf <indiego@gmx.net>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: XML export of a lua table
Date: Thu, 23 Feb 2017 14:32:35 +0100	[thread overview]
Message-ID: <cb8a4e54-1330-7315-05a8-6d42be2ea3a7@gmx.net> (raw)
In-Reply-To: <3b29f205-d474-c5d5-d2dc-6e68a3bca9af@wxs.nl>

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
___________________________________________________________________________________

      reply	other threads:[~2017-02-23 13:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-23 12:50 Peter Rolf
2017-02-23 13:10 ` Hans Hagen
2017-02-23 13:32   ` Peter Rolf [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cb8a4e54-1330-7315-05a8-6d42be2ea3a7@gmx.net \
    --to=indiego@gmx.net \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).