Conversion of data from InDesign format to XML is usually necessary because the end user is unable to accept data in InDesign format.
Conversion from InDesign to XML involves IDML input files. This is because InDesign is a binary language and therefore not suitable for immediate conversion to XML. In conversion from InDesign to XML the client actually supplies IDML input files. These files can then be converted to XML.