How to escape special characters when retrieving data from database?

Posted by ziang on Stack Overflow See other posts from Stack Overflow or by ziang
Published on 2010-04-05T15:11:16Z Indexed on 2010/04/05 15:33 UTC
Read the original article Hit count: 178

Filed under:
|
|

I am going to generate XML file based on the data returned from SQL Server, but there are some special characters like  and  (there may be other characters like these), which will fail the XML.

Is there any way to escape them?

Thanks!

© Stack Overflow or respective owner

Related posts about sql

Related posts about server