c# - Convert into proper XML format -
i getting input string in xml format symbols in codes. how can convert input in proper xml format using function? or should manually replace codes symbols?
for example:
%3cusers%3e %3cuser%3e %3cuserid%3e 567844d3-9ee8-463b-a1a0-9d7a8a59a66a %3c/userid%3e %3cemailid%3e activation1@dealertrack.com %3c/emailid%3e %3c/users%3e
convert
<users> <user> <userid> 567844d3-9ee8-463b-a1a0-9d7a8a59a66a </userid> <emailid> activation1@site.com </emailid> </users>
ps: xml contains other symbols also.
add reference system.web
, use httpserverutility.urldecode method (string):
var decodedxml = system.web.httputility.urldecode(xml);
Comments
Post a Comment