Hi,
Use this
myDocument.importXML(File(inputXmlFile));
1) Get the indesign document xml using
myDocument.exportFile(ExportFormat.xml, File("indesignDocumentXmlStructure.xml"));
This will be exact structure of document structure in the form XML.
2) Now manually or by code you will fill the data in XML.
3) Use myDocument.importXML(File(inputXmlFile));
Whatever it may be graphic or text the data will be merged.
Hope this helps.
Regards,
Venky