2.2.6.5.7 Collection of EDMSimpleType
In the OData 3.0 protocol, a collection property of simple types, defined on an EntityType, MUST be represented in the same way that it is in the Atom-based format, as specified in section 2.2.6.2.9.2. However, the XML element that represents the collection instance as a whole MUST be the root of the XML document (not a child element, as described in section 2.2.6.2.9.2. For example, the EmailAddress property of type string (an EDMSimpleType) in the sample model (see Appendix A: Sample EDM and CSDL Document (section 6)) is represented in the following listing.
-
<?xml version="1.0" encoding="utf-8"?> <d:EmailAddresses m:type="Collection(Edm.String)" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"> <d:element>alternate1@company.com</d:element> <d:element>alternate2@company.com</d:element> </d:EmailAddresses>
Listing: XML Formatted Collection of EDMSimpleType