I would like to add a tag to a selected text and searching this forum I found a great solution:
app.activeDocument.xmlElements.item(0).xmlElements.add ("Price", app.selection);
But does anyone know how to tag a selection and add several attributes at the same time?
Many thanks for your feedback. It works great.