示例#1
0
文件: kr.py 项目: antroy/Home
from kid import Template

class Node (object):
    def __init__(self, name, children=[]):
        self.children = children
        self.name = name
    
    def children(self):
        return self.children


top = Node("top")
a = Node("A", [Node("a")])
b = Node("B", [Node("x"),Node("y")])
top.children = [a, b]
        

template = Template(name="xx")
template.tree = top
print template.serialize(output='html')