Replacing HTML charcters with entity equivalents

  • Thread starter Thread starter iGadget
  • Start date Start date
I

iGadget

Hi,
Is anyone aware of a built-in method to substitute HTML or XML reserved
characters with their escaped equivalents?
If I have the String "If X < Y then hello" I have to substitute the '<' in
order to encode it into a serialized XML string.
What is the 'correct' way in .NET?

Cheers,
iGadget
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top