This is how we are serializing the object:
writer = new XmlTextWriter(new MemoryStream(), enc);
XmlSerializer serializer = new XmlSerializer(o.GetType());
serializer.Serialize(writer, o);
byte[] bytes = ((MemoryStream)writer.BaseStream).ToArray();
writer.Flush();
return enc.GetString(bytes, 0, bytes.Length).Trim();
The object itself has multiple namespaces in it since it declares an
instance of another object b for example which is in a different namespace
"chanmm" wrote:
Can you give an example? Your code?
chanmm
"Tammy Lemire" <Tammy Le****@discussions.microsoft.comwrote in message
news:BA**********************************@microsof t.com...
We have an object structure which maps to an XML Schema we have defined.
This
schema has complex types which are causing XML Namespace information to be
embedded into the XML when we use the XMLSerializer to serialize the
objects.
Do you know if there is a way to prevent the namespace information from
being
embedded in the XML by the serializer?
-Tammy