Issue when using XML reserved characters in the rml file

REST version : v2.3.4

Hi,

I encountered following issue when using the && operator within a string in the rml file (in my case for TRestAnalysisPlot):

<globalCutString string="Sum$(veto_PeakTime.second > 200 && veto_PeakTime.second < 300) == 0" />

Apparently < > & are reserved XML characters, as well as ' ". When parsed by TRestMetadata::GetElement(), and showing it through the ElementToString-Method, the < and > characters are replaced by the named entities &lt; and &gt; respectively. However, && is just omitted, which results in an error when executing the rml. The solution is to replace && in the rml file with the named entities &amp;&amp;

<globalCutString string="Sum$(veto_PeakTime.second > 200 &amp;&amp; veto_PeakTime.second < 300) == 0" />

I luckily could find this issue rather quickly, but I think it should be allowed to directly use && in the rml to make the experience more user friendly, especially in the example here, where I explicitly want to pass a string to the process.

Can anyone implement this?

I believe this was fixed recently

You should use AND and OR, instead of && and || in your RML.

Yet, you need to be at development branch.

You are right, with AND it works:

<globalCutString string="Sum$(veto_PeakTime.second > 200 AND veto_PeakTime.second < 300) == 0" />