Change XML-Output of ODATA

Topics: ASP.NET Web API
Aug 24, 2013 at 9:11 PM
Hi
I've defined an EntitySet of SerializableDictionary(Of String, String). This class creates the serialisation-output of an dictionary-object in XML(<Product>). The type of Get-Function in the controller is IQueryable(Of SerializableDictionary(Of String, String))

The current output in xml is as shown bottom. How can I:
-change name of ArrayOfSerializableDictionaryOfstringstring
-change SerializableDictionaryOfstringstring (I can remove <Product> from Dic-Class)


<ArrayOfSerializableDictionaryOfstringstring xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebApiTest2">
<SerializableDictionaryOfstringstring>
<Product>
<ProductID>1</ProductID>
<Matchcode>Product-Matchcode</Matchcode>
</Product>
</SerializableDictionaryOfstringstring>
<SerializableDictionaryOfstringstring>
<Product>
<ProductID>2</ProductID>
<Matchcode>Product-Matchcode2</Matchcode>
</Product>
</SerializableDictionaryOfstringstring>

The goal: reading dynamic data (a product can have fields, which can be created from users) in Excel with ODATA.

Best regards
Christoph