Show TOC

XML ViewsLocate this document in the navigation structure

An XML view is one of the predefined view types that are available in SAPUI5.

The XML view type is defined in an XML file. The file name either ends with .view.xml or as an XML string. The file name and the folder structure together specify the name of the view that equals the SAPUI5 module name within the require/declare concept.


For resources/sap/hcm/Address.view.xml, the view name is sap.hcm.Address. The application uses this view name for displaying an instance of this view. If you define the XML view by means of an XML string, no file or require/declare is needed.

The file looks as follows:

<mvc:View controllerName="sap.hcm.Address" xmlns="sap.ui.commons" xmlns:mvc="sap.ui.core.mvc">
      <Image src=""/>
      <Button text="Press Me!"/>

Nest the XML tags analogous to the nesting sequence of SAPUI5 controls and add the property values as attributes.