I have below code snippet to read file containing xml string and convert it to the XDocument.
public static XDocument ReadXmlContent(string xmlFilePath) { if (!string.IsNullOrEmpty(xmlFilePath)) { string content = File.ReadAllText(xmlFilePath); XDocument xDoc = XDocument.Parse(content); return xDoc; } return null; } This is doing my job well but with one issue. One of the node in xml string object is
<billDescriptionValue>This is the charge in advance for your %quantity% Line isolating unit No. 1A at £%quantity rate% per unit per month</billDescriptionValue> now, when i parse this using XDocument.Parse, the above content becomes
<billDescriptionValue>This is the charge in advance for your %quantity% Line isolating unit No. 1A at £%quantity rate% per unit per month</billDescriptionValue>
so why '& #xA3;' is changed to '£' ?? how can i stop this?
Thanks a lot in advance.
No comments:
Post a Comment