Can you show me a manual that will help me to deepen my understanding of the write code?

Using the fodt file I realized that many of the write problems are solved more directly and quickly. Can you show me a manual that will help me to deepen my understanding of the write code? Thanks

Assune the “write” occurring twice in the question’s text is meant to mean Writer.
And code refers to the way Writer documents are stored to files (so-called file-format)?

Though this could solve many of your problems, I don’t recommend it. You will effectively get all the formatting , index collection, etc. as you’d like it but once you edit your document the patches you made on the XML will be wiped out when Writer saves the file: internally the XML is translated into “objects” the code manages; at save time, there is an inverse translation. If your patches have no corresponding translation patterns, they will be lost.

The only context in which you could “succeed” is in the very last state of your document. You add your patches as a final touch before printing (or creating a PDF) and you no longer edit the file.

That said, what you are looking for is probably the ODF specification.

You should find everything here. V1.3 is an enhancement already used by LibO in advance of its final approvement.

OK. Thanks.

You seem to be decisive concerning the lot of programming I would expect to be needed to achieve your goals.
If there arise problems of the kind @ajlittoz (who is much more experienced than I am) expects, you may need to also program for the opened documents and for that load and resave information not directly interpreted by the application.
See LibreOffice: UserDefinedAttributesSupplier Service Reference in this case.