file = open('test.xml', 'r')
elem = ElementTree.parse(file)
namespace = '{http://somens}'
search = './/{0}prop'.format(namespace)
prop_parents = elem.findall(search + '/..')
for parent in prop_parents:
    for prop in parent.findall(search):
        type = prop.get('type', None)
if type == 'json':
    value = json.loads(prop.attrib['value'])
if value['name'] == 'Page1.Button1':
    parent.remove(prop)
Search and remove element with elementTree in Python