5

I want to serialize datacontract classes into XMl, but without the Namespaces.

I've added:

[DataContract(Namespace="")]

but I still get:

<Person xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Title>Mr</Title>
...
</Person>

Is there any way to stop this happening as I just want the clean xml to pass into a legacy component.

BlueChippy
  • 5,935
  • 16
  • 81
  • 131

0 Answers0