Refactor and make `app/src/utils/xml` files more generic to have only 2 functions instead of 2 functions per object