I have nba videos news website (wordpress) and I want to insert xml data into the existing posts.

For ex I have this post Pacers vs Timberwolves Match report and I want to import data from this xml: 404 Not Found

I know how to echo and get data from xml feeds but my problem is how to assign automatically these xml feeds based on each posts (match reports) .

I need to collect data first and store it at my local DB?

Retrieve a specific field from taxonomy term OR custom field term and use it on xml url's ex http(s)://api.sportradar.us/nba/[season]/games/[game_id]/summary.xml?api_key=[api_key] ?

Also as alternative I can use JSON feeds.