docs

Using Native HTML in XML Views (deprecated)

The use of native HTML in XML views depends on the XHTML feature set.


Caution:

Deprecated as of OpenUI5 version 1.120. Consider either using sap.ui.core.HTML or creating a notepad control instead, both of which can be used in your XML view.

When mixing XHTML and OpenUI5 controls, observe the following rules:

Note:

As an alternative to embedding XHTML, you can use the sap.ui.core.HTML control. As this requires content encoding it is, however, less convenient.

Note:

Native XHTML can’t be used in the binding template for a bound aggregation (e.g., the content aggregation) of the XML view.


To mix OpenUI5 controls with native XHTML, you only need the XHTML namespace to use (X)HTML:

<mvc:View controllerName="module:sap/hcm/Address" xmlns="sap.m" xmlns:mvc="sap.ui.core.mvc"
           xmlns:html="http://www.w3.org/1999/xhtml">
   <Panel>
      <Button text="Press Me. I am an SAPUI5 Button"/>
      <html:button>No, press me. I am native HTML Button.</html:button>
   </Panel>
</mvc:View>