How does gojs export an exact SVG file?

I want to export SVG according to my needs. For example, I need <defs>,<symbol>…
However, when I export some text, I find that the text position is not precise enough. I want to know how to handle the text when exporting SVG officially?

You can make arbitrary changes to the SVG in the function which you supply as the elementFinished option to Diagram.makeSvg.