I'm using the following code to generate an xml:
public bool SerializarObjeto(object o, string pathArquivo)
{
var xns = new XmlSerializerNamespaces();
XmlSerializer writer = new XmlSerializer(o.GetType());
StreamWriter file = new StreamWriter(pathArquivo);
writer.Serialize(file, o, xns);
file.Close();
return true;
}
Generate the following result in a given file:
<item iis="078906590000500400348059" produzido="2016-07-15T07:34:54" />
My problem:
I need you not to leave the space before closing the tag:
As it leaves: " />
How it should exit: "/>
Thank you.