I am using StringReplace to replace > and < by the char itself in a generated XML like this:
StringReplace(xml.Text,\'>\',\'>\',[rfReplaceA
Systools (Turbopower, now open source) has a ReplaceStringAllL function that does all of them in a string.