# Introduction

It is possible to define the underlying data model without having to write java code. To do this, you must use an XML descriptor which describes the DataNodes and their relationships. An skeleton XML descriptor has the following structure:

```XML
<?xml version="1.0" encoding="UTF-8"?>
<zkib-model>
    <datanode name="my-data">
        <finder name="title" type="title">
        </finder>
        <finder name="country" type="country">
            ...
        </finder>
    </datanode>
    <datanode name="title"/>
    <datanode name="country">
        <finder name="city" type="city">
            ...
        </finder>
    </datanode>
     
    <datanode name="city">
            ...
    </datanode>
</zkib-model>
```

<span class="notranslate">Within the XML tag whose root is always zk-ib, you can specify one or more DataNodes.</span> <span class="notranslate">Each DataNode has a unique name.</span> Within each<span class="notranslate"> DataNode, you can define multiple finders.</span> Each<span class="notranslate"> finder specifies a name and a type. The name will be used to build xpaths, whlie the type identifies the type of DataNode this xpaths refers to.</span>

<span class="notranslate">Within each finder you can define multiple search handlers.</span> They w<span class="notranslate">ill be responsible for retrieving data from persistent storage, just like the find method on the finder interface.</span> <span class="notranslate">Additionally, you can define one or new instance handlers.</span> <span class="notranslate">They will be responsible for creating new business objects on user request.</span>

<span class="notranslate">Finally, each DataNode can have many persistence handlers. They will act just lik the doInsert, doUpdate and doDelete methods on DataNode class. Each type of handler can</span><span class="notranslate"> be executed conditionally, depending on expressions to be evaluated at run time.</span> <span class="notranslate">These expressions can use the following predefined variables:</span>

<span class="notranslate">Additionally, EL expressions may refer to all variables defined within the DataSource. Those variables are accessed via JXPathContext.getVariables() method. </span>To use of this type of data models, simply create a datamodel component on the ZUL page and assign the src attribute the path to the XML descriptor. The path can be a web component or a class path resource.

<div id="bkmrk-variable-value-self-"><div><table class="confluenceTable tablesorter tablesorter-default stickyTableHeaders" role="grid"><thead class="tableFloatingHeaderOriginal"><tr class="tablesorter-headerRow" role="row"><th aria-disabled="false" aria-label="Variable: No sort applied, activate to apply an ascending sort" aria-sort="none" class="confluenceTh tablesorter-header sortableHeader tablesorter-headerUnSorted" data-column="0" role="columnheader" scope="col" tabindex="0"><div>**Variable**</div></th><th aria-disabled="false" aria-label="Value: No sort applied, activate to apply an ascending sort" aria-sort="none" class="confluenceTh tablesorter-header sortableHeader tablesorter-headerUnSorted" data-column="1" role="columnheader" scope="col" tabindex="0"><div>**Value**</div></th></tr></thead><tbody aria-live="polite" aria-relevant="all"><tr role="row"><td class="confluenceTd">self</td><td class="confluenceTd">Current DataNode</td></tr><tr role="row"><td class="confluenceTd">instance</td><td class="confluenceTd">Business object wrapped into current DataNode</td></tr><tr role="row"><td class="confluenceTd">parent</td><td class="confluenceTd">Parent DataNode</td></tr><tr role="row"><td class="confluenceTd">parent.instance</td><td class="confluenceTd">Business object wrapped into parent DataNode</td></tr><tr role="row"><td class="confluenceTd">datasource</td><td class="confluenceTd">DataSoruce the current DataNode belongs to</td></tr></tbody></table>

</div></div>