Chapter 6. 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 section.
The Special Case of InDesign Tables (Namespaced XML)
A surprising number of layout people have never tried the table features of InDesign, preferring to group text frames to make tables. But because InDesign CS 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.
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 and type COURSE DESCRIPTIONS as the heading ...