mirawsvatekw
New Member
Does anyone know why the namespace is still being added to the root during datacontractserialization?\[code\]<Response xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Event><Address>...</Response>[DataContract(Name = "Response", Namespace = "")]public class ApiEventResponse{ [DataMember(EmitDefaultValue = http://stackoverflow.com/questions/12647135/false)] public ApiEvent Event { get; set; }}var serializer = new DataContractSerializer(type,"Response", ""); return Task.Factory.StartNew(() => { using (var xmlw = new XmlTextWriter(writeStream, Encoding)) { xmlw.Formatting = Formatting.Indented; serializer.WriteObject(xmlw, value); } });\[/code\]