Update attributes and elements