protected virtual string XmlDecode(string xml) { Contract.Requires(xml != null); var xe = XElement.Parse("<x>" + xml + "</x>", LoadOptions.PreserveWhitespace); return xe.Value; }