[Last Call] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 349
  • Last Modified:

String Escape Sequences

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?

1 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.
srinivas_vemlaAuthor Commented:
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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now