Smartsite SXML CopyCode image Copy Code
<se:xmldatatable save="person" resulttype="datatable">
    <se:row><se:col name="Location">Earth</se:col><se:col name="Level" datatype="integer">1</se:col></se:row>
    <se:row><se:col>Europe</se:col><se:col>2</se:col></se:row>
    <se:row><se:col>Finland</se:col><se:col>3</se:col></se:row>
    <se:row><se:col>Germany</se:col><se:col>3</se:col></se:row>
    <se:row><se:col>Netherlands</se:col><se:col>3</se:col></se:row>
    <se:row><se:col>Norway</se:col><se:col>3</se:col></se:row>
    <se:row><se:col>Sweden</se:col><se:col>3</se:col></se:row>
    <se:row><se:col>Switserland</se:col><se:col>3</se:col></se:row>
    <se:row><se:col>Asia</se:col><se:col>2</se:col></se:row>
    <se:row><se:col>China</se:col><se:col>3</se:col></se:row>
    <se:row><se:col>Japan</se:col><se:col>3</se:col></se:row>
    <se:row><se:col>Vietnam</se:col><se:col>3</se:col></se:row>
</se:xmldatatable>

<se:format inputdata="person">
    <se:rowformat trim="right">
        <li>
            {this.levelrownumber()}. {this.field(Location)}{this.childlevelresult()}
        </li>
    </se:rowformat>
    <se:levelformat groupby="this.field(level)" trim="both">
        (<em>Level {this.level()}</em>)
        <ul>
            {this.levelresult()}
        </ul>
    </se:levelformat>
</se:format>
Example Result CopyCode image Copy Code
(<em>Level 1</em>)
        <ul>
            
        <li>
            1. Earth(<em>Level 2</em>)
        <ul>
            
        <li>
            1. Europe(<em>Level 3</em>)
        <ul>
            
        <li>
            1. Finland
        </li>
        <li>
            2. Germany
        </li>
        <li>
            3. Netherlands
        </li>
        <li>
            4. Norway
        </li>
        <li>
            5. Sweden
        </li>
        <li>
            6. Switserland
        </li>
        </ul>
        </li>
        <li>
            2. Asia(<em>Level 3</em>)
        <ul>
            
        <li>
            1. China
        </li>
        <li>
            2. Japan
        </li>
        <li>
            3. Vietnam
        </li>
        </ul>
        </li>
        </ul>
        </li>
        </ul>