On Tue, Jun 2, 2020 at 12:24 PM vitalije wrote:
> Here is a function that generates tuples from the xml content:
>
I like what I am seeing so far. Also, I was able to download
issue-1598-experiments.leo without problems.
Edward
--
You received this message because you are subscribed to the G
>
> I have a question - you say that the nodes_from_leo_xml()function will be
> used for various paste commands. This way, the xml bits have to be parsed
> each time the nodes are processed. I would have expected that xml not be
> used for internal communications, but only for external intera
Vitalije, the code you have been showing is very nice indeed. It's short,
understandable, and apparently very performant as well. What a pleasure!
I have a question - you say that the nodes_from_leo_xml()function will be
used for various paste commands. This way, the xml bits have to be parsed
Here is a function that generates tuples from the xml content:
def nodes_from_leo_xml(contents):
'''
Parses contents as xml Leo document and returns
a generator of the tuples
(parent_gnx, gnx, childIndex, h, b, ua, descendentUas)
suitable to be piped to the build_tree
I hope google will accept the attachment containing scripts.
I've started implementing some of the propositions discussed earlier in
another thread.
First of all I think Leo should have a single function that will build an
outline from some iterable.
def build_tree(c, it):
'''
This func