XML Serialization in C# without XML attribute nodes
Posted
by Alex Marshall
on Stack Overflow
See other posts from Stack Overflow
or by Alex Marshall
Published on 2009-12-21T19:04:16Z
Indexed on
2010/06/03
15:24 UTC
Read the original article
Hit count: 1563
Hello,
I have an XML document format from a legacy system that I have to support in a future application. I want to be able to both serialize and deserialize the XML between XML and C# objects, however, using the objects generated by xsd.exe, the C# serialization includes the xmlns:xsi..., xsi:... etc XML attributes on the root element of the document that gets generated. Is there anyway to disable this so that absolutely no XML attribute nodes get put out in the resulting XML ? The XML document should be elements only.
Duplicate? XmlSerializer: remove unnecessary xsi and xsd namespaces
© Stack Overflow or respective owner