Before you export content to an XML file, you must tag the text and other items (such as frames and tables) that you want to export. You also need to tag items that you have created as placeholders for imported XML content. Items that have been tagged appear as elements in the Structure pane.
Create (or load) tags to identify each content element that you want to export or import. Then tag text or page items using one of these techniques:
When tagging page items, note the following:
You can apply tags to stories as well as to text within stories. For example, you might want to apply an Article tag to a story, and then apply more specific tags, such as Title and Body, to paragraphs within the story.
You can apply only one tag to a story. When you tag a frame in a threaded story, all other frames in the story, along with any overset text, are assigned the same tag.
You can apply only one tag to a graphics frame. When you tag a graphics frame, InDesign records a reference to the graphic’s location (on disk).
You cannot tag a group of objects. To tag an item that’s
part of a group, use the Direct Selection tool to
select the item.
When you tag text within a tagged element (such as a paragraph within a story), it appears as a child of the existing element in the Structure pane.
You can tag text or images on a master page, but only one instance of the corresponding element appears in the Structure pane regardless of how many times the item appears on document pages. However, if you manually override a master item and then tag it on a document page, the item will appear as a separate element in the Structure pane.
You can’t tag a footnote.
When you tag text within a frame, the new element appears in the Structure pane as a child of the frame element in which the text is located.
By clicking the Autotag icon in the Tags panel, you can tag a text frame, table, table cells, or an image automatically. To tag the item, InDesign applies a default tag that you specify in the Tagging Preset Options dialog box.
Paragraph styles and character styles you assign to text can be used as a means of tagging paragraphs and text for XML. For example, a paragraph style called Caption can be associated with a tag called FigureName. Then, using the Map Styles To Tags command, you can apply the FigureName tag to all text in your document assigned the Caption paragraph style. You can map more than one style to the same tag.
The new XML tags are applied throughout your document to paragraph and character styles that you specified in the Map Styles To Tags dialog box.
When you tag a table for XML, you create a table element as well as one cell element for each cell in the table. The cell elements are child elements of the table element, and are created automatically.