Well I think we know that the answer is not a lot. So long as Renoise saves and loads its own produced XRNS files, AFAIK there is no helpers for external third party programs producing XRNS files. If your program produces a even slightly malformed Song.xml file it probably will crash Renoise.
The only thing I can add at the moment (due to the scarcity of information) is that I’d first match the tab indentation levels between what your program produces and what Renoise produces as its Song.xml. Just makes it a bit easier to compare files (I’m not sure it makes any difference from a parsing point of view. But IDK.)
The other thing to maybe consider is that if you are writing a module conversion routine, is it possible to write a lua script that takes your module format and puts the information into Renoise.
Looking a bit further I think why your TestWrite.xrns is crashing is because you haven’t matched the number of PatternTracks to the number of actual SequencerTracks defined. In your XML you only have like 3 or 4 PatternTracks defined in the PatternPool, but Renoise is expecting at least 8 tracks. So if you increase the amount of PatternTracks in the PatternPool it should now load into Renoise. This seems to load your file in:
TestWrite_loadable.xrns (4.1 KB)