If this is your first foray into the fractured realm of XML, this post won't help by much. Try Google - a first glance shows Adobe's own documentation (which I personally never read, actually), a lecture by Cari Jansen, and even a YouTube video. Use these to familiarize yourself with the basic concepts first.
The good news is: YES it's perfectly possible to export your formatted text as XML.
The very easiest way would be to have InDesign automatically fill in XML tags for each paragraph and character style export right away. It does require you -- the text formatter -- to strictly and esclusively use paragraph and character styles to format, but then again that should be virtually a requirement for ALL the work one does in InDesign. Another requirement is that the supplied DTD allows this.
On its own or in combination with the above, you can manually tag items as well as add structural elements in the document. That's what the Structure pane is for, the XML view of your document that appears on the left side of the screen if you call it up from the View menu. (Try it -- although you'll see nothing of interest because, presumably, none of your documents are tagged.)
You should probably tell him that it will cost you a lot more to do it. I realize this is your biggest client, but it's plausibly going to double or triple your time.
What DTD is it? It is it a standard one? The first few lines should help you identify it.
Prepare for a world of hurt, I'm afraid. Most fundamentally, the issue is that every piece of content in InDesign now has to be designated/tagged for XML export to work properly. This can be via paragraph styles, or via manual tagging. Either way, it can be awfully error-prone and potentially labor-intensive, especially if you don't use scripting automation.
Is your client familiar with InDesign's XML capabilities? They may or may not be a good match for his needs...
Thanks for your reply. It does confirm what we feared - that this is not a simple thing to achieve by any means!
We will continue to explore all avenues and try to remain optimistic.
Thanks for your response. It does kind of confirm our fears - that creating XML files from InDesign is neither simple or straightforward. At the end of the day if our client is using this as a cost-cutting exercise (which I suspect they are), then we may be best pulling out now rather than spending valuable time and resources pursuing the possibility of going down this route when they are not prepared to pay more for the end product.
Once again, thanks alot for your prompt response and suggestions.