After you have created and tagged placeholder frames, tables, and text—and made sure that your document and the incoming XML file have the same tags and structure—you can import XML content into your layout.
You must use the Merge Content option to import XML into placeholders (or to replace existing content in your document). When merging content, InDesign replaces identically tagged and structured elements in your document with the imported XML elements. You can use additional import options to exclude imported (that is, filter) content that doesn’t match the document structure, to delete document items that aren’t matched or replaced by the imported XML, and to clone repeating XML elements.
If the imported XML file contains elements that are not found in the document, InDesign places these elements in the Structure pane without laying them out in your document.
To successfully merge XML into placeholders, keep these rules in mind:
Tag placeholders with the identical tag name as the XML element that will replace it (or be flowed into it).
In placeholder text, make sure any spacing, returns, tabs or static text is outside the placeholder element tags, but within the parent element for the story.
When you import the XML, select Do Not Import Contents Of Whitespace-Only Elements. (This preserves spacing and static text if the XML elements you import consist of white spaces only.)
When importing and placing XML data using the Merge Content option, the XML Import Options dialog box offers the following options: