469,644 Members | 1,746 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,644 developers. It's quick & easy.

how do i replace escape character in an XML?


In an XML How do i replace the escape character "\" with "" ?

I tried few differently things in C# like Replace, nothing seems to work.

Example : <Veh id=\"Vehicle-01\" >
I want to remove backslashes in this.

Any ideas?
Jun 15 '07 #1
1 2503
5,058 Expert 4TB
If your using C# couldn't you just treat it as a string and use the Replace() method:
Expand|Select|Wrap|Line Numbers
  1. String myXML = "<node param=\"value\"></node>";
  2. myXML = myXML.Replace("\\\", "\"");
  3. Console.Write(myXML); 
Outputs <node param="value"></node>
Jun 18 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Theo Chakkapark | last post: by
5 posts views Thread by mp | last post: by
14 posts views Thread by Etu | last post: by
4 posts views Thread by jpierson | last post: by
23 posts views Thread by dkirkdrei | last post: by
6 posts views Thread by Gabriel | last post: by
5 posts views Thread by shapper | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.