Special Character Must Be Replaced

XML use <element-name> to denote an element, so you have to replace special characters. For example, you have to use &lt; to represent the < character.

Special Character

Replaced With

<

&lt;

>

&gt;

&

&amp;

"

&quot;

'

&apos;

Alternatively, you could ask XML parser not to interpret a piece of text by use of CDATA as follows.

<zscript>
<![CDATA[
void myfunc(int a, int b) {
    if (a < 0 && b > 0) {    
        //do something        
    }    
]]>
</zscript>

It is interesting to notice that backslash (\) is not a special character, so you don't need to escape it at all.