public static string Serialize(Type objectType, object obj, XmlSerializerNamespaces namespaces)
{
StringBuilder stringBuilder = new StringBuilder();
XmlWriterSettings xmlSettings = new XmlWriterSettings() { OmitXmlDeclaration = true };
XmlWriter t_writer = XmlWriter.Create(stringBuilder, xmlSettings);
new XmlSerializer(objectType).Serialize(t_writer, obj, namespaces);
t_writer.Flush();
t_writer.Close();
return stringBuilder.ToString();
}
public class Header {
[XmlElement(ElementName = "Sender", Namespace = "example1.com/v11")]
public string Sender;
[XmlElement(ElementName = "Reciever, Namespace = "example1.com/v11"")]
public string Reciever;
}
public class Header {
[XmlElement(ElementName = "Sender", Namespace = "site.com/v22")]
public string Sender;
[XmlElement(ElementName = "Reciever, Namespace = "site.com/v22"")]
public string Reciever;
}
heroku local
валится ошибкой22:47:49 worker.1 | $GOPATH/go.mod exists but should not
module app
go 1.12
worker: go run ./src/main.go