[api] move XML renderer to views where easily possible