Exporting XML

Marking Up (Tagging) Existing Content for XML Export

The "tagging" process is generally quite straightforward. Select objects or text, and then click a tag name in the Tags window's list of tags (assuming that you have loaded tags). See the InDesign Help section Tagging content to export to XML for more information. For tables and images, I have provided more details in this Short Cut.

The Special Case of InDesign Tables (Namespaced XML)

The table features of InDesign are relatively new, and a surprising number of layout people have never tried them, preferring to group text frames to make tables. But because InDesign CS2+ offers powerful table design and production, we will make good use of them for our XML processes.

We'll work through some table exercises. First, to understand how InDesign represents a table as XML, we will start by saving a tagged table as XML.

Select Table>Insert Table. The Insert Table dialog opens. Create this table as two columns, with one heading row, and three normal rows.

Now, click in the top left edge of the first row to select the row, then select Table>Merge Cells to combine the two cells into a single row.

Repeat the Merge Cells operation for the second and fourth rows of the table, leaving the third row as two separate cells.

Now use Table>Select>Table to make sure the entire table is selected, then use the Tags palette to tag the entire table as <CourseDescriptions> (the root element of the sample XML file).

Select the top row, type COURSE ...

Get XML Publishing with InDesign CS2+ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.