extract attributes from empty elements