Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4618336
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T02:15:09+00:00 2026-05-22T02:15:09+00:00

I understand these are escape characters but how do I read from a XML

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T02:15:10+00:00Added an answer on May 22, 2026 at 2:15 am

    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:

    Note
    At compile time, verbatim strings are converted to ordinary strings with all the same escape sequences. Therefore, if you view a verbatim string in the debugger watch window, you will see the escape characters that were added by the compiler, not the verbatim version from your source code. For example, the verbatim string @"C:\files.txt" will appear in the watch window as "C:\\files.txt".

    Example:

    var mystring = "Hello\r\nWorld";
    
    Console.Write(mystring);
    

    Output:

    Hello
    World
    

    If you actually want to get rid of line breaks in a string, you can, for example, use a regex:

    var result = Regex.Replace(mystring, @"\s+", " ");
    
    // result == "Hello World";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This code comes from K&R. I have read it several times, but it still
I have just read the following code but do not understand why there is
I grabbed this code form JCarousel and just trying to understand these lines below.
I understand that these methods are for pickling/unpickling and have no relation to the
I'm kind of writing a little game engine -- purely to understand how these
I understand it's a standard practice to look at both these variables. Of course
Can you help me understand the practical differences between these two; IList<int> myList =
I've been researching the difference between these two patterns. I understand that facade encapsulates
Excuse my daftness, but I can not understand how ruby vars can be attained
How should I understand these? null>0 > false null==0 > false null>=0 > true

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.