# Tree sample

    source ../../oo.tcl

    @import core.*

    #- creating Tree object with "Network" for root node
    tree = [[Tree new] root: Network]

    #- adding eth0 node
    $tree add: Network/eth0
    $tree add: Network/eth0/0

    #- adding serial node
    $tree add: Network/serial0
    $tree add: Network/serial0/0
    $tree add: Network/serial0/1

    #- outputting all nodes in a sorted list
    puts stderr [lsort [$tree allChildsOf: Network]]

    #- releasing instance
    $tree release