Remove unwanted elements only if these don't have any attributes.