The only way to produce .idml files from .inx or other document sources, would be to use Adobe InDesign which is the default software for IDML format. It is unlikely you could perform this conversion without InDesign, especially when .inx files are produced using that software as well.
Convert Adobe InDesign Interchange File Format to InDesign Markup Language document.
We have found 2 software records in our database eligible for .inx to .idml file format conversion.
Microsoft Windows software - convert inx to idml on Windows
Professional desktop document publishing software from Adobe
Convert from inx file format
The tables with software actions are a good pointer for what a certain program does with various file types and often may give users a good hint how to perform certain file conversion, for example the above-mentioned inx to idml. However, it is not perfect and sometimes can show results which are not really usable because of how certain programs work with files and the possible conversion is thus actually not possible at all.
Apple macOS / Mac OS X software - convert inx to idml on OS X
Mac version od Adobe's popular document designing and publishing software