Improve xml provider generated api for the common case of collections