Only setAttribute on an element node

Fixes #31