Not show name with CollectionDataContract atribute

ritz

New Member
I am currently implementing an API using ServiceStack, and I've run into an issue. The API spec that I've been given defines the XML packet that will be sent to the API. This spec is not able to be changed and is not controlled by myself.The issue is that in the root element, there is a list of items like so:\[code\]<data> <id>0</id> <locationID>10</locationID> <cust> <id>0</id> </cust> <cust> <id>0</id> </cust> <cust> <id>0</id> </cust> <cust> <id>0</id> </cust></data>\[/code\]I have implemented the spec and have it almost correct, however I can't figure out how to have the elements repeating in the XML without a surrounding parent node.As this is using ServiceStack I am using Data Contracts and have tried setting up the element as a CollectionDataContract, however that wraps the elements in a parent node.I was wondering if it is possible to specify that the parent element is not used or if it is possible to implement a plain List in the node that contains the nodes without the parent.Any ideas?
 
Back
Top