I correctly defined the class and after serializing it to XML I do not get any encoding.
How can I determine the encoding "ISO-8859-1"?
Here is a sample code
var xml = new XmlSerializer(typeof(Transacao)); var file = new FileStream(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "transacao.xml"),FileMode.OpenOrCreate); xml.Serialize(file, transacao); file.Close();
Here is the beginning of the created xml
<?xml version="1.0"?> <requisicao-transacao xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <dados-ec> <numero>1048664497</numero>
Gandarez
source share