Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Thursday, January 28, 2010 4:11 PM
Hi,
For example I need to convert string "Mark's Marine Inc" to "Mark's Marine Inc".
But instead that resultXML contains "Mark's Marine Inc".
What is wrong with my code? Unfortunately I can use just .NET 3.0
XmlElement xmlField = xmlDoc.CreateElement("Keyword");
xmlField.SetAttribute("Name", idxControl.Column.Name);
xmlField.InnerText = idxControl.Value.Replace("&", "&").Replace("<", "<").Replace(">", ">").Replace("\", """).Replace("'", "'"); xmlKeywords.AppendChild(xmlField);
...
resultXml = xmlDoc.OuterXml;
Oleg
All replies (1)
Thursday, January 28, 2010 10:31 PM âś…Answered | 2 votes
This link provides several options for escaping XML characters with C#:
Hope this helps.www.insteptech.com ; msmvps.com/blogs/deborahk
We are volunteers and ask only that if we are able to help you, that you mark our reply as your answer. THANKS!