When I am creating xml through XMLWRITER after xml generation when i am opening it into notepad then <![CDATA[" + CSVcoloumn.Name + "]]> these angle breakts is encrypted like <![CDATA[3335BR]]> Please help.
Even i also use Encoding but it is not working please help
I am using this method to create xml
var writerSettings = new XmlWriterSettings { Encoding = Encoding.UTF8, Indent = true, OmitXmlDeclaration = true, ConformanceLevel = ConformanceLevel.Fragment, CloseOutput = false };
using (var writer = XmlWriter.Create(XMLFilepath, writerSettings)) { writer.WriteStartElement("jobs"); foreach (var CSVcoloumn in CSVjobslist) { writer.WriteStartElement("job"); writer.WriteElementString("name", "<![CDATA[" + CSVcoloumn.Name + "]]>"); }
}
and this is the output when i am opening in notepad
<job> <name><![CDATA[3335BR]]></name> <site_id><![CDATA[6015]]></site_id> <client_id><![CDATA[ ]]></client_id>