You would normally set a model on a control (either the table directly, or one of its parents) in the controller. So I'm going to assume you're wondering about the latter part of your initial statement: "assigning a data binding to a table ... when using XML-Views".
All you have to do is express the aggregation as an XML attribute. So if your demoJSONModel looked like this:
var demoJSONModel = new sap.ui.model.json.JSONModel({
data : [
{ id : 42 },
{ id : 1.618 },
{ id : 3.14 }
]
});
then you could set the binding for the table's 'rows' aggregation like this:
<table:Table
width="100%"
visibleRowCount="5"
selectionMode="Single"
editable="false"
rows="{/data}">
I've put together an example in JSBin that shows this.