-1

I've got XML API data from which I need to take a value and run another API call from it.

<?xml version="1.0" encoding="ISO-8859-1"?>

<result status="OK" host="systemmonitor.co.uk" created="2018-10-26T09:45:27+01:00">

<client>

<clientid>12345</clientid>

</client>

<client>

<clientid>67890</clientid>

</client>

There's about 100 clients in this file and what I need is to be able to take the ClientID value for each one and run it through another API call (I'm assuming I can set it as a variable?)

How would I go about taking the multiple client IDs and running them through api calls to get more data?

1 Answers1

0

You could use ElementTree to extract the data and then feed that into a list to make your second API call. This post might help: Extracting text from XML using python

dennisdee
  • 160
  • 10