I have the following xml file I got from QGIS I would like to recursively substitute the value “2” in the field using the information included in the “description” field REALNAME2 in order to have respectively as final output in my kml any suggestions? Answer I recommend you to use the element tree API together with XPath. It’s quite easy