XML use <element-name> to denote an element, so you have to replace special characters. For example, you have to use < to represent the < character.
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.