The problem here is that < or > has special meaning in XML therefore the XML parser will fall over on this. There are two options
1. use > for > and < for <
2. use <![CDATA[ your query ]]> around your query
This should work (I haven't tried it tho)
Thanks for your help, i figured out to use > for > and < for < , it works fine now.