String Escape Sequences

Posted on 2005-04-14
Last Modified: 2010-04-16
I have a code segment that creates XML nodes and returns all the XML as a string. It works fine on the code segment end, but when I receive this string from the calling function, escape sequences are added before all double-quotes.

For example:
<node1 att1="val1" />

<node1 att1=\"val1\" />

Any idea how I can skip that escaping?

Question by:srinivas_vemla
    LVL 7

    Accepted Solution

    Are you sure those escape sequences are really there? If you're looking at the values in the debugger, the string that's displayed in there is formatted the way you would format it in code in order to have a literal with the same value, so escape sequences like that are added where appropriate. I doubt the slashes are actually in your string, because a slash isn't even meaningful in XML as an escape sequence. Try printing out the string instead of looking at it in the debugger to verify this.

    Author Comment

    Yes Ceiled,

    I was looking at it in the debugger and now when i move it to a text box it looks good...

    Thanks for the reply

    Featured Post

    Live: Real-Time Solutions, Start Here

    Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

    Join & Write a Comment

    Article by: Ivo
    C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
    Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now