I understand these are escape characters but how do I read from a XML document and ignore them? I’m using XmlDocument, by the way.
I understand these are escape characters but how do I read from a XML
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The string you read from the file does not literally contain
"\r\n". Those are escape sequences.'\r'and'\n'represent a carriage-return and new-line character, respectively, which form together a line break.If you’re looking with the VS debugger at the string, however, you may see the escape sequences instead of actual line breaks. From MSDN:
Example:
Output:
If you actually want to get rid of line breaks in a string, you can, for example, use a regex: