Before you export content from an InDesign document to XML, you must have done the following:
Created or loaded element tags.
Applied tags to items on the pages of your document.
Adjusted the hierarchy of tagged elements in the Structure pane, if needed.
You can export all or a portion of the XML content in your document. Only content that is tagged can be exported.