Populating a DataTable

In this example, a node list is selected from the given Xml document, and a given DataTable is populated with nodes relative to the nodes in the selected nodes.

Smartsite SXML CopyCode image Copy Code
{buffer.set(d, datatable.createempty())}
<se:xmlprocessor save="a" >
        <se:parameter name="xml">
                    <address nr="1">
                        <zipcode>3521 AL</zipcode>
                    <address nr="2">
                        <street>Elektronicaweg 131</street>
                        <zipcode>2628 XG</zipcode>
        <se:parameter name="actions">
                <se:member type="multiplenodes" query="//addresses/address" >
                    {this.populatedatatable($d, 'nr=@nr', 'street=./street', 'zipcode=./zipcode', 'city=./city')}

<se:format inputdata="{buffer.get(d)}" resultformat="{page.setforcedresult(this.result())}">
<se:rowformat trim="both"><p>
    {this.field(street)}<br />
    {this.field(zipcode)}, {this.field(city)}
Example Result CopyCode image Copy Code
    Jaarbeursplein<br />
    3521 AL, Utrecht
    Elektronicaweg 131<br />
    2628 XG, Delft