Builder generates invalid XML
See original GitHub issueExpected Behavior
That the builder will generate a valid XML view.
Current Behavior
It generates an invalid one (missing “f” namespace):
<mvc:View xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m" controllerName="sap.ui.demo.todo.controller.App" displayBlock="true"><App><Page><customHeader><f:ShellBar title="{i18n>TITLE}" homeIcon="./img/logo_ui5.png"/></customHeader><content><HBox class="create-todo-wrapper"><Input class="todoInput" id="addTodoItemInput" value="{/newTodo/text}" placeholder="{i18n>INPUT_PLACEHOLDER}" submit=".addTodo"/><DatePicker id="datepicker" valueFormat="dd/MM/yyyy" displayFormat="dd/MM/yyyy" value="{/newTodo/deadline}"/><Button type="Emphasized" text="{i18n>BUTTON}" press=".addTodo"/></HBox><List id="todoList" backgroundDesign="Transparent" mode="MultiSelect" showNoData="false" items="{ path:'/todos' }"><CustomListItem visible="{= !${done} }" selected="{done}"><HBox><VBox justifyContent="Center"><Text text="{text} - finish before: {deadline}"/></VBox><Button class="editButton" text="{i18n>EDIT}" press=".onEditTodo"/><Button type="Reject" text="{i18n>DELETE}" press=".onDeleteTodo"/></HBox></CustomListItem></List><Panel expandable="true" expanded="true" width="auto"><headerToolbar><OverflowToolbar style="Clear"><Title text="{i18n>COMPLETED}"/></OverflowToolbar></headerToolbar><content><List id="doneList" mode="MultiSelect" backgroundDesign="Transparent" items="{/todos}"><CustomListItem visible="{done}" selected="{done}"><HBox><VBox justifyContent="Center"><Text text="{text} - finish before: {deadline}"/></VBox><Button class="editButton" text="{i18n>EDIT}" press=".onEditTodo"/><Button type="Reject" text="{i18n>DELETE}" press=".onDeleteTodo"/></HBox></CustomListItem></List></content></Panel></content><dependents><Dialog id="editDialog" title="{i18n>EDIT_TODO}" contentWidth="400px"><content><VBox><Label text="{i18n>TODO_TITLE}" labelFor="input-title"/><TextArea width="100%" id="input-title" value="{/edit/text}"/><Label text="{i18n>TODO_DATE}" labelFor="input-date"/><DatePicker id="input-date" valueFormat="dd/MM/yyyy" displayFormat="dd/MM/yyyy" value="{/edit/deadline}"/></VBox></content><buttons><Button text="{i18n>CANCEL}" press=".onClose"/><Button type="Emphasized" text="{i18n>SAVE}" press=".onSave"/></buttons></Dialog></dependents></Page></App></mvc:View>
Steps to reproduce the issue
- Clone sample repo
git clone https://<SAP Cloud GitHub/Marius' User>/ui-tech-samples.git
cd sapui5-sample-app
- Remove the yarn.lock file (the current lock file won’t break the build - I’m not sure why)
- Run the following commands to build and host the dist folder
yarn install && yarn build && npx http-server dist
Context
- UI5 Module Version (output of
ui5 --version
when using the CLI):2.4.4 and 2.6.0
- Node.js Version:
v12.13.1
- npm Version:
6.14.8
- OS/Platform:
MacOS Catalina 10.15.7
Affected components (if known)
Log Output / Stack Trace
NA
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Node.js XML builder Error: Invalid character in name
Realize that your error is not about special characters in your XML document; it's about special characters in the names of your XML...
Read more >javax.xml.parsers.DocumentBuilder to skip invalid XML ...
Hi, I convert XML files into flat files. In doing so I call the API DocumentBuilder.parse(File f). If the XML file f contains...
Read more >Upgrading from xmlbuilder | xmlbuilder2
xmlbuilder exports two functions for creating a new XML document: create and begin ... in xmlbuilder2 as it can potentially result in invalid...
Read more >"An invalid XML character" error. The Integration Service failed ...
This issue occurs if the repository content has any character beyond repository code page, while reading or parsing the repository contents.
Read more >PM83313: XMLSTREAMEXCEPTION AN INVALID XML ... - IBM
XMLStreamException: An invalid XML character (Unicode: 0x2d) was found in the prolog of the document. at org.apache.axiom.om.impl.builder.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I can confirm minify-xml v2.1.3 fixes the reported issue. It’s part of @ui5/cli v2.6.1
Fixed with 2.1.3 sorry for any inconvenience caused!