Tarandeep Kaur
Tarandeep Kaur

Reputation: 13

Content of XML view does not get loaded on adding a container

Content of my view does not get loaded on adding l:VerticalLayout. If I remove it, the view works fine then. I'm adding xmlns:l="sap.ui.layout" too. In the console, it shows the error:

Uncaught (in promise) Error: resource ns/HTML5Module/view/View1.view.xml could not be loaded from ./view/View1.view.xml. Check for 'file not found' or parse errors. Reason: Error: Invalid XML: <mvc:View controllerName="ns.HTML5Module.controller.View1" xmlns:mvc="sap.ui.core.mvc" displayBlock="true" xmlns="sap.m" xmlns:l="sap.ui.layout" >"

Please see the code below:

Screenshot of my UI5 view code

I am using SAP Business Application Studio.

Upvotes: 1

Views: 1007

Answers (1)

Boghyon Hoffmann
Boghyon Hoffmann

Reputation: 18064

According to the spec:

Attributes must be separated from each other by one or more ASCII whitespace.

I.e. in your case, it should be:

<!-- Correct XML syntax: one or more whitespace between the attributes: -->
<Title level="H2" text="Layout Example"></Title>

Instead of:

<!-- Invalid syntax: no whitespace between `level` and `text`: -->
<Title level="H2"text="Layout Example"></Title>

Upvotes: 1

Related Questions