I am working with some XML that holds strings like:
This is a string
Some of the strings that I am passing to the
The only illegal characters are &
, <
and >
(as well as "
or '
in attributes).
They're escaped using XML entities, in this case you want &
for &
.
Really, though, you should use a tool or library that writes XML for you and abstracts this kind of thing away for you so you don't have to worry about it.