How to generate a <ul><li> tree without recursive using python or other language ??

Posted by user210221 on Stack Overflow See other posts from Stack Overflow or by user210221
Published on 2010-05-14T02:18:20Z Indexed on 2010/05/14 2:24 UTC
Read the original article Hit count: 246

Filed under:
|
|
class tree:
    def __init__(self, name='a', childs=[]):
        self.name = name
        self.childs = childs

output:

<ul>
    <li>
    Introduction
    <ul>
        <li>Sub Intro</li>
    </ul>
    </li>

    <li>Module 1</li>
</ul>

Sorry, my English is poor.

© Stack Overflow or respective owner

Related posts about tree

Related posts about generate