Opened 8 years ago

Last modified 3 years ago

#4109 accepted defect

invalid xml file with logFormat is xml

Reported by: Willi Braun Owned by: Willi Braun
Priority: normal Milestone:
Component: Run-time Version:
Keywords: Cc: Adeel Asghar

Description

In the xml logFormat of the c runtime is the root element missing, what may leads to parsing error while usage.

Change History (11)

comment:1 by Willi Braun, 8 years ago

Status: newaccepted

comment:2 by Martin Sjölund, 8 years ago

You can't add a root node because of OMEdit parsing the XML on the fly :(

Anyway, there should not be a possibility to get invalid XML except if external functions write to stdout. I would rather instead propose that OMEdit / etc redirects the output to a file instead; then we always get valid XML in the file, and other things not using ModelicaMessage, etc will be printed to stdout.

in reply to:  2 ; comment:3 by Willi Braun, 8 years ago

Cc: Adeel Asghar added

Replying to sjoelund.se:

I would rather instead propose that OMEdit / etc redirects the output to a file instead; then we always get valid XML in the file, and other things not using ModelicaMessage, etc will be printed to stdout.

hm, but this would imply that the user get information after a simulation run, even something like chattering note and other performance issue. Other ideas?

Replying to sjoelund.se:

You can't add a root node because of OMEdit parsing the XML on the fly :(

ah, okay, but I did already OMCompiler, probably I should revert it for now, since there are anyway more things to fix for valid xml. PR1175.

in reply to:  3 comment:4 by Martin Sjölund, 8 years ago

Replying to wbraun:

Replying to sjoelund.se:

I would rather instead propose that OMEdit / etc redirects the output to a file instead; then we always get valid XML in the file, and other things not using ModelicaMessage, etc will be printed to stdout.

hm, but this would imply that the user get information after a simulation run, even something like chattering note and other performance issue. Other ideas?

Not necessarily. And especially not on Linux/Mac where you can use named pipes or setup file descriptors sent to the process. You can read a file that is being written even on Windows as far as I know. And otherwise we could setup TCP/IP with OMEdit to send these messages as well...

comment:5 by Martin Sjölund, 8 years ago

Milestone: 1.11.01.12.0

Milestone moved to 1.12.0 due to 1.11.0 already being released.

comment:6 by Francesco Casella, 7 years ago

Milestone: 1.12.01.13.0

Milestone moved to 1.13.0 due to 1.12.0 already being released.

comment:7 by Francesco Casella, 6 years ago

Milestone: 1.13.01.14.0

Rescheduled to 1.14.0 after 1.13.0 releasee

comment:8 by Francesco Casella, 5 years ago

Milestone: 1.14.01.16.0

Releasing 1.14.0 which is stable and has many improvements w.r.t. 1.13.2. This issue is rescheduled to 1.16.0

comment:9 by Francesco Casella, 4 years ago

Milestone: 1.16.01.17.0

Retargeted to 1.17.0 after 1.16.0 release

comment:10 by Francesco Casella, 4 years ago

Milestone: 1.17.01.18.0

Retargeted to 1.18.0 because of 1.17.0 timed release.

comment:11 by Francesco Casella, 3 years ago

Milestone: 1.18.0

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.