[1.6 UI] [Warning] XML parser: not well-formed (invalid token) at line 1

0

Hi,

I observed that from time to time I get warning message as:

[Warning] XML parser: not well-formed (invalid token) at line 1

which is connected to ui .uicanvas files, I suppose.

Can you check that ?

Cheers

asked 7 years ago203 views
4 Answers
0
Accepted Answer

Hi @REDACTEDUSER

That sounds like an error that could occur if the UI system was attempting to open a file as a UI canvas but the file was not actually a saved UI canvas file. Next time you see that could you open the file in a text editor and paste the first few lines here? Also, do you get this when opening a file in the UI Editor or when loading a canvas file at run-time?

Thanks,

Rob

answered 7 years ago
0

Hi @REDACTEDUSER

This error I get during Run-time loading via Canvas/LoadIntoEntity FN (here I load one canvas into another - 2x LoadIntoEntity).

The first lines are:

<ObjectStream version="1"> <Class name="AZ::Entity" version="2" type="{75651658-8663-478D-9090-2432DFCAFA44}"> <Class name="EntityId" field="Id" version="1" type="{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}"> <Class name="AZ::u64" field="id" value="16546804917438919487" type="{D6597933-47CD-4FC8-B911-63F3E2B0993A}"/> </Class> <Class name="AZStd::string" field="Name" value="UiCanvasEntity" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/> <Class name="bool" field="IsDependencyReady" value="true" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/> <Class name="AZStd::vector" field="Components" type="{2BADE35A-6F1B-4698-B2BC-3373D010020C}"> <Class name="UiCanvasComponent" field="element" version="1" type="{50B8CF6C-B19A-4D86-AFE9-96EFB820D422}"> <Class name="AZ::Component" field="BaseClass1" type="{EDFCB2CF-F75D-43BE-B26B-F35821B29247}"> <Class name="AZ::u64" field="Id" value="6261678898352291036" type="{D6597933-47CD-4FC8-B911-63F3E2B0993A}"/> </Class>

and:

<ObjectStream version="1"> <Class name="AZ::Entity" version="2" type="{75651658-8663-478D-9090-2432DFCAFA44}"> <Class name="EntityId" field="Id" version="1" type="{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}"> <Class name="AZ::u64" field="id" value="16710028582501874453" type="{D6597933-47CD-4FC8-B911-63F3E2B0993A}"/> </Class> <Class name="AZStd::string" field="Name" value="UiCanvasEntity" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/> <Class name="bool" field="IsDependencyReady" value="true" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/> <Class name="AZStd::vector" field="Components" type="{2BADE35A-6F1B-4698-B2BC-3373D010020C}"> <Class name="UiCanvasComponent" field="element" version="1" type="{50B8CF6C-B19A-4D86-AFE9-96EFB820D422}"> <Class name="AZ::Component" field="BaseClass1" type="{EDFCB2CF-F75D-43BE-B26B-F35821B29247}"> <Class name="AZ::u64" field="Id" value="718087441548082854" type="{D6597933-47CD-4FC8-B911-63F3E2B0993A}"/> </Class>

Thank you for your investigation :)

answered 7 years ago
0

Hi @chase,

Thank you for so clarity answer. You found a problem: I use '<' and '>' chars in my text.

answered 7 years ago
0

Hi @jasiuj - if your UI canvas is loading correctly (that is, you're not seeing any issues/bugs with it other than the XML warning), then its possible that you're seeing a bug related to our Text Styling Markup feature:

http://docs.aws.amazon.com/lumberyard/latest/userguide/ui-editor-components-visual.html#ui-editor-component-text-styling-markup

The feature allows you to style text (on a text component) using a basic markup language (reminiscent of HTML). We use an XML parser to parse the string every time the string contents are loaded (or are changed), so if your canvas has a text component that contains reserved XML characters ('<', '>', '&'), and the text doesn't form a (somewhat) properly formatted XML string, the XML parser will log a warning that the string couldn't be parsed.

If that's the issue, then you can happily ignore the warning. We have a bug written up to suppress those warning messages to avoid unnecessary concern.

To verify if that's what is causing the issue:

  1. Check the canvas that's causing the warning to see if you have any text components that contain reserved XML characters ('<', '>', '&').
  2. Or, you can create a copy of the canvas, and remove any elements with text components on the canvas and verify whether the error still occurs. Again, if you're not noticing any problems (other than the warning itself), you can probably just ignore it and we should have the issue resolved eventually in an upcoming release.

Thanks for bringing this to our attention!

answered 7 years ago

This post is closed: Adding new answers, comments, and votes is disabled.