I am using StringReplace to replace > and < by the char itself in a generated XML like this:
StringReplace(xml.Text,\'>\',\'>\',[rfReplaceA
Try FastStrings.pas from Peter Morris.