Here's some crude ElementTree code that does the job. In a real program you'd probably want some error checking. But if you're sure your XML data will always be perfect, and that every interface tag will always contain a source tag and a model tag, then this code will do the job.
import xml.etree.cElementTree as ET
data = '''
<domain type='kvm'>
<devices>
<interface type='network'>
<mac address='52:54:00:a8:fe:3d'/>
<source network='ovirtmgmt'/>
<model type='virtio'/>
</interface>
<interface type='network'>
<mac address='52:54:00:a8:fe:7d'/>
<source network='nat'/>
<model type='virtio'/>
</interface>
<interface type='network'>
<mac address='52:80:00:a8:66:20'/>
<source network='vm'/>
<model type='virtio'/>
</interface>
</devices>
</domain>
'''
tree = ET.fromstring(data)
for iface in tree.iterfind('devices/interface'):
network = iface.find('source').attrib['network']
if network == 'nat':
model = iface.find('model')
model.attrib['type'] = 'e1000'
ET.dump(tree)
output
<domain type="kvm">
<devices>
<interface type="network">
<mac address="52:54:00:a8:fe:3d" />
<source network="ovirtmgmt" />
<model type="virtio" />
</interface>
<interface type="network">
<mac address="52:54:00:a8:fe:7d" />
<source network="nat" />
<model type="e1000" />
</interface>
<interface type="network">
<mac address="52:80:00:a8:66:20" />
<source network="vm" />
<model type="virtio" />
</interface>
</devices>
</domain>
If you're using an old version of Python you may not have iterfind. In which case, replace it with findall.
https://docs.python.org/3/library/xml.etree.elementtree.html