Playing around with the Web API with Framework 4.0 Wanted XML only output, so removed the JSON formatter from the formatters collection. Now, I'd like to modify the standard XML that the XMLSerializer is outputting:
<?xml version="1.0"?>
-<ArrayOfCategory xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">-
<Category>
<Id>1</Id>
<Name>Drink</Name>
</Category>-
<Category>
<Id>2</Id>
<Name>Snack</Name>
</Category>
</ArrayOfCategory>
I'd like to change the "Arrayof" node to say something more meaningful, and need to add a couple more nodes (with extra information) above the "Arrayof" node.
Is there an easy way to do this? or do I have to write a custom formatter/seralizer?