I prefer a single file for each DS, but the other approach is also possible.
If you need a XA datasource you have to use a DS file similar to the example.
It looks to me that you did not define the <xa-datasource-class> element or the give class is not in the lib folder of your installation.