You’re generally doing the right things, but a few details can make a big difference in how cleanly XML content comes into InDesign.
One thing I do is set up a predefined table in the library (or template) first, then bring the XML in, so that structure + styles are already in place.
If your XML uses the same tag for very different things (say <para> for headings and body text and captions), InDesign won’t know which style to apply reliably. More distinct tags (e.g. <heading>, <body>, <caption>) make mapping easier.
The XML for tables needs to follow the structure InDesign expects, tags for table/cell (and sometimes row), correct attributes (rows count, columns, header rows etc.). If it's off, content may end up as inline text rather than a proper table.
Mapping tags to styles is powerful, use Map Tags to Styles after import, making sure each tag is linked to the correct paragraph, cell, table style etc.
If your source XML doesn’t match InDesign’s expected structure, sometimes a preprocessing step (an XSLT or other transform) helps tidy things up before import.
Also, ensure your template already has the styles defined (table, cell, header vs body rows, etc.) so the import has styles to inherit or hook into.
... View more