Better conform to ElementTree standards

Missed another violation of the use of an element's attribute. (An
element's attribute isn't always guaranteed to be a Python dictionary, so
we must make sure to use the provided methods to work with it)