Click here to Skip to main content
15,891,926 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,
I am creating XML file using XMLDocument, but when XML node get '&' as data, it converting in "Ampersand(&)amp;" but i need actual value that is '&', Can anyone please tell me how can I achieve it?
Posted
Updated 2-Jul-13 3:18am
v2
Comments
Richard MacCutchan 2-Jul-13 9:25am    
OK, I see what you are saying; so you need to follow the rules for XML, which means interpreting the control characters, as shown in the link I gave you.

 
Share this answer
 
To include the XML reserved character & you must encode them as hexadecimal character reference. For & its hexadecimal reference is
&


Please refer https://support.google.com/checkout/sell/answer/70649?hl=en[^] for more information on encoding special character in XML.
 
Share this answer
 
v2
Comments
prashant khadatkar 2-Jul-13 9:16am    
Thanks for replying, I have used it but not working.
Prasad Khandekar 2-Jul-13 10:08am    
Nope, It's not correct. The & symbol gets encoded as &

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900