Hi G,
There are a number of ways that you can do what you need. First off, I'm guessing that you are not necessarily after a script that turns arbitrary XML into IDML, but rather a script to turn your XML into an InDesign document. If you need an IDML file, the easiest course to take is to create the InDesign document, and then export IDML from it. IDML is a complex format that is not trivial to create from scratch–I'm not saying that it can't be done, it's just not super easy.
I'm thinking that if this is just a one time thing (you will not be getting the same kind of XML files in the future), and the document isn't overly long, it might be possible that your best course of action is to create a new ID document manually using the XML file as a guide. If you will regularly be getting the same type of XML documents, then it might be worth the time and expense to create a script (or hire someone to write the script for you) to automatically create an InDesign document from the XML for you.
FYI: Both InDesign and InDesign Server handle XML in the same way, so you do not need IDS to do what you want–the standard desktop version will do just as well as server for this task.
I've written a number of InDesign scripts that consume XML and would be happy to help if you want to go in that direction.
—
Jim Birkenseer
https://www.premediasystems.com