Python help - XML file, information lookup

Hi guys!

New to the whole Python language (and coding in general) and was hoping to get some help making this work.

Basically i want the script to look into an external .XML file, and retrieve relevant values.

The “slab” child and the “base_shell” child both have a guid that match. I want to, for each wall element in Revit, compare the slab guid with the base_shell guid. If these match, i want to find the corresponding diameter value in the “wire” child.

The output would result in two lists; one with each wall element, the other with the corresponding diameter value.

Right now i’m getting two wall elements (which is all that exists in Revit), and two values for the diameter. However, the diameters should be 0.01 and 0.008 (the two different values in the XML file. It’s not possible to see both of them, but two instances of “surface_reinforcement” exists in the file).

I have yet to figure out how to make the connection with the corresponding wall element in Revit. I think I might need to use a different guid, or herhaps the “name” value for the slab_part.

Below I’ve attached a picture of the XML file, the python script and the resulting lists.