I don't know XML but I do know something about EPUB which creates a single stream of content.
With EPUB, you'd want the images to be anchored objects in the text stream. (To tell you how would require you telling us what version of InDesign you're using. This is much easier in the current version, InDesign CS5.5.)
I also know you can change the order by using the Structure Panel (View > Structure > Show Structure in CS5.5).
I haven't had the opportunity to work with the ePub option but the idea was to work with XML to output the content to be repurposed for various media. What I probably need to do is to check how I should be tagging the content and probably use IDML also to script to get to my goal.
Can't you export it as an XML file? If not please tell me, I've never worked with XML.
Can you help me with a solution? Do let me know if my question is unclear.
It's unclear. XML is really really complicated and there are thousands of variations, because it's infinitely flexible. In order to understand your question, we need to know what kind of XML schema you need, and what you are getting, and posssibly also how your document is set up.
Are you exporting to IDML (an XML format that is zipped), or using InDesign's XML Export?