- if location.getElementsByTagName('street')[0].childNodes:
- street = location.getElementsByTagName('street')[0].childNodes[0].data
- if location.getElementsByTagName('city')[0].childNodes:
- city = location.getElementsByTagName('city')[0].childNodes[0].data
- if location.getElementsByTagName('country')[0].childNodes:
- country = location.getElementsByTagName('country')[0].childNodes[0].data
- if location.getElementsByTagName('postalcode')[0].childNodes:
- postalcode = location.getElementsByTagName('postalcode')[0].childNodes[0].data
+ if location_element.getElementsByTagName('street')[0].childNodes:
+ street = location_element.getElementsByTagName('street')[0]\
+ .childNodes[0].data
+ if location_element.getElementsByTagName('city')[0].childNodes:
+ city = location_element.getElementsByTagName('city')[0]\
+ .childNodes[0].data
+ if location_element.getElementsByTagName('country')[0].childNodes:
+ country = location_element.getElementsByTagName('country')[0]\
+ .childNodes[0].data
+ if location_element.getElementsByTagName('postalcode')[0].childNodes:
+ postalcode = location_element.getElementsByTagName('postalcode')[0]\
+ .childNodes[0].data