[Beremiz-devel] XML Problem

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[Beremiz-devel] XML Problem

Hannes Hering
Hello,

when trying to enter the character sequence

]]>

into the code editing window of latest beremiz creates the attached
bug report. I guess the end tag for the CDATA XML token is not
escaped, and entering it messes up a lot.

I'm trying to port some code from OSCAT libraries regarding XML
parsing for use with a Beremiz based environment. The offending code
is somethng like:

VAR
    e_code : STRING;
END_VAR

e_code := ']]>'

Is someone able to help over that? Or is there an idea how to fix that
problem in the IDE?

Kind Regards

Hannes

PS: Reminds me a bit of little Bobby Tables (https://xkcd.com/327/)


_______________________________________________
Beremiz-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beremiz-devel

bug_report_2019_04_24__20-36-55.txt (24K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [Beremiz-devel] XML Problem

Beremiz-Devel mailing list
On Thursday, April 25, 2019 08:25:29 Hannes Hering wrote:

> Hello,
>
> when trying to enter the character sequence
>
> ]]>
>
> into the code editing window of latest beremiz creates the attached
> bug report. I guess the end tag for the CDATA XML token is not
> escaped, and entering it messes up a lot.
>
> I'm trying to port some code from OSCAT libraries regarding XML
> parsing for use with a Beremiz based environment. The offending code
> is somethng like:
>
> VAR
>     e_code : STRING;
> END_VAR
>
> e_code := ']]>'
>
> Is someone able to help over that? Or is there an idea how to fix that
> problem in the IDE?
>

 Hmmm... This seems to be a limitation of PLCopen XML itself, and not Beremiz.

 I can think of two possible ways of attacking this:

1)
 I honestly don't know whether this is possible or if it makes any sense, but
perhaps Beremiz could replace all '>' characters before saving to XML with
'>' ?
 Edouard or Andrey would have to comment on this.


2)
 Work around the problem.

e_code := CONCAT(']]', '>');



  Cheers,

       Mario.



_______________________________________________
Beremiz-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beremiz-devel