docs: public void write(XMLStreamWriter writer) throws XMLStreamException {
        for (Attribute<?> attr : attributes.values()) {
           if (attr.isPersistent())
              attr.write(writer, attr.getAttributeDefinition().xmlName());
        }
     }