Read data from external source. XML vs REST API

Your question seems like a false dichotomy. If you use a REST API to access the data, it has to be returned in some format, and that format will often be XML.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)