Add metadata to object and preserve it with svg export?

Is there any way to add data attributes or at least classes to objects that will be included in an svg export?