Clearing attributes in Tritium

254 views Asked by At

What's the best way to clear all attributes of an element with Tritium? Do I have to enumerate all existing attributes with attribute(%name, "") ?

1

There are 1 answers

0
jefeman On

The best way is to use the remove function by itself after selecting an item.

remove("@*")

You could even select the node first

remove("//node/@*")