question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Builder generates invalid XML

See original GitHub issue

Expected 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

  1. Clone sample repo git clone https://<SAP Cloud GitHub/Marius' User>/ui-tech-samples.git
  2. cd sapui5-sample-app
  3. Remove the yarn.lock file (the current lock file won’t break the build - I’m not sure why)
  4. 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:closed
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
RandomBytecommented, Nov 3, 2020

I can confirm minify-xml v2.1.3 fixes the reported issue. It’s part of @ui5/cli v2.6.1

1reaction
kristiancommented, Nov 3, 2020

Seems to be a bug in one of the regular expressions in minify-xml. See kristian/minify-xml#4 .

Fixed with 2.1.3 sorry for any inconvenience caused!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found