There are special characters such as '&' in e.Result .
I just tried replacing these characters (everything except '<', '>', '"'), with HttpUtility.HtmlEncode() and XDocument parsed it
UPD:
I didn’t want to show my code, but you had no chance :)
string y = ""; for (int i = 0; i < s.Length; i++) { if (s[i] == '<' || s[i] == '>' || s[i] == '"') { y += s[i]; } else { y += HttpUtility.HtmlEncode(s[i].ToString()); } } XDocument document = XDocument.Parse(y); var options = (from option in document.Descendants("option") select option.Value).ToList();
This works for me on WP7. Please do not use this code to convert html . I quickly wrote it for testing
source share