Keeping shapes' metadata in LibreOffice DRAW

Hello everyone,

I have a question about LibreOffice DRAW: I’m currently trying to auto-generate some diagrams by direct construction of XML scheme for .fodg file. I also need to parse and read it back afterwards. As far as every shape describes rather complicated object, I’d like to keep in file some hidden metadata for each shape (for example, ID in database).
I can place some kind of {span style=“display:none”} tags for this purpose of course, but each time when I’m trying to visually edit my diagrams in DRAW itself and save changes, the program seems to be saving only visible data. All my hidden “metadata” is lost.
Is there any good way to keep some hidden text info for each shape separately when I save my file in DRAW?

Best regards,
ILya