at first i was a bit confused by this, because lepl doesn't really enforce any
kind of ast - you can construct whatever you want.
but then i remembered that many of the examples use the List class (and in
older versions used the Node class). so i am guessing you're referring to
if so, then it extends an ordinary python list (the [....] thing) so i expect
the standard json libraries could handle it. however, you will lose the type
(the class name) which is often important.
so i guess (eventually!) what you are asking is: if you're constructing an ast
using List subclasses, how can you convert that into xml in a way that keeps
the class name?
which is a good question (and the short answer is that there is nothing
i've just tried playing around with some ideas, but it depends very much what
your ast looks like.
so could you reply with an example of an ast and the kind of xml you'd like,
and i can reply with something more helpful?
the reason i can't give a general reply is because often asts contain lists of
values, and i don't see a single obvious way to stick lists of things in xml
(you can use attributes or text or surround them with elements, but i don't
know what would be best, or what attribute or element name you'd want, without
something to guide me).
ps if json would work then you could perhaps use pytyp
http://www.acooke.org/pytyp/pytyp.s11n.json.html but i get the impression you
would prefer xml and working out how to use pytyp is itself a fair amount of