The XML model allows to bind controls to XML data. It is a client-side model intended for small datasets, which are completely available on the
client. The XML model does not contain mechanisms for server-based paging or loading of deltas. It supports two-way binding.
To instantiate the model, use the following
code:
#!jsvar oModel = new sap.ui.model.xml.XMLModel();
The XML model allows to bind controls to XML data. It is a client-side model intended for small data sets, which are completely available on the
client. The XML model does not contain mechanisms for server-based paging or loading of deltas. It supports two-way
binding.
#!jsoModel.setData(oXMLDocument);
To create inline XML data or to get XML data as a string, the XML model provides a
setXML method. This method takes XML in text
format and uses the browser's XML parser to create a document.
#!jsoModel.setXML("<?xml version=\"1.0\"?><some><xml>data</xml></some>");
Usually, you load your data from the server using an HTTP-based service, so the
loadData method provides an easy way to load XML
data from the given URL:
#!jsoModel.loadData("data.xml");
For more information, see the API
Reference in the Demo Kit.