How to compare html literal using c# -
i need compare 2 htmls. 1 url using webclient.downloadstring
method. other have on bucket on amazon s3
. problem when using downloadtext
method of amazon sdk, html special characters substituted html codes "
double quotes. comparision different. know if theres work around deal problem.
if file not in amazon in file system, method file.readtext
works charm.
if source 'escaped' htmldecode method should trick you:
using system.web; string escapedsource = "<p>"some content unescaped"</p>"; string unescapedresult = httputility.htmldecode(escapedsource); unescapedresult.dump();
result:
<p>"some content unescaped"</p>
Comments
Post a Comment