writer.writeStartDocument(DEFAULT_CHARSET, XML_VERSION);
XmlCollectionEntityProducer.append(writer, propertyInfo, data);
writer.flush();
csb.closeWrite();
return ODataResponse.entity(csb.getInputStream()).build();
} catch (EntityProviderException e) {
csb.close();
throw e;