How to access remote XML file

I wanted to make use of load_data to fetch a remote XML file:

So I have:

{% set response = load_data(url="", format="xml") %}

What I’m struggling with now is how to process the response. If I try to output it I just get [Object].

I’m sure this is very simple, but I’m struggling to get my head round it. Any pointers? Thanks!

This is going to be converted to a object matching the XML format. No way to pretty print it right now sadly (it does work as expected in tera v2) so it is trial and error

Thanks for the reply!

No issue printing it out as I can view the raw XML, however I just can’t work out the syntax for accessing the data - is there an example it the docs anywhere?

Sorry for what is probably a very basic question!

Something like response["your_field"] should work

Ah, that’s got me closer, I was missing the quotes.

So the part I’m trying to loop over (looking at the XML) is the “entry” part, which looks like this:

<media:content url="xxx">

All I really want out of this is the image URL from that <media field.

If I do this:

{% for entry in response["feed"]["entry"] %}
     {{ entry }}
{% endfor %}

I just get:

Tried to iterate using key value on variable `response["feed"]["entry"]`, but it is missing a key