Is there a function in c # that escapes special characters so that the string can be safely used in xml ??? Plus will be the possibility of reverse parsing. Example:

<?xml version="1.0"?> <Bsmessage xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <nick>Alex</nick> <password>werq34f34gfrvq32g424</password> <recipient>Andrew</recipient> <message>rsgr</message> </Bsmessage> 
  • In XML and in queries in the database (SQL) different screening. What exactly do you need? - PashaPash
  • You should never make SQL queries manually. - VladD
  • Forget about bd. - Sanych Goilo
  • @SanychGoilo and how exactly do you want to use a string in XML? All standard methods of working with XML themselves screen values. Can you give me an example of code where something goes wrong? - PashaPash
  • one
    @SanychGoilo exactly how do you make this xml? do you manually fold the strings? Or through, for example, through XElement / XDocument classes? - PashaPash

0