cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

invalid XML in Web IDE

Former Member
3,879

The Web IDE gives an error for my XML file. How can I fix this? Thank you!

<Dialog contentWidth="50%" contentHeight="40%" title="{i18n>createJourneyTitle}" xmlns="sap.m" xmlns:l="sap.ui.layout" xmlns:mvc="sap.ui.core.mvc"><l:VerticalLayout width="100%"> <l:content> <Label text="{i18n>name}:" labelFor="journeyName"/> <Input id="journeyName" required="true"/> <Label text="{i18n>description}:" labelFor="journeyDesc"/> <Input id="journeyDesc"/> </l:content> </l:VerticalLayout> <beginButton> <Button press="onCreate" text="{i18n>createJourneyBtn}"></Button> </beginButton> <endButton> <Button press="onDialogClose" text="{i18n>cancelBtn}"></Button> </endButton> </Dialog>

Accepted Solutions (1)

Accepted Solutions (1)

boghyon
Product and Topic Expert
Product and Topic Expert

Web IDE somehow requires <core:FragmentDefinition xmlns:core="sap.ui.core"> as the root node of the fragment, even though syntactically the XML is perfectly valid. This is a Web IDE issue.

<core:FragmentDefinition xmlns:core="sap.ui.core">
  <Dialog xmlns="sap.m" ...>
  </Dialog>
<core:FragmentDefinition>

The FragmentDefinition is required only if there are multiple root nodes. But Web IDE doesn't seem to care and complaints that the XML is invalid.

_________
Alternatively, you can switch to the Basic XML validator in the project settings.

This also resolves the Invalid XML error but applies to all XML documents.

Former Member
0 Likes

Thank you very much!

Answers (0)