- Sep 14, 2009
XML Tags and the Tags Panel
XML tags provide the connection between the general name of an XML element and a specific instance of that element in the XML structure. It’s important to understand that the XML tag and the XML element are different things. Associating a tag with a frame or a text object adds an instance of the element type to the structure, but the tag itself has nothing to do with the structure.
The Tags panel is the key to applying and managing XML tags in InDesign (see Figure 14-12).
Figure 14.12 Tags Panel
Creating an XML Tag
To create an XML tag, follow these steps (see Figure 14-13).
Figure 14.13 Adding a New Tag
- Display the Tags panel, if it’s not already visible (choose Tags from the Window menu).
- Click the New Tag button at the bottom of the panel (or choose New Tag from the Tags panel menu).
- Enter a name for the tag. You can do this by typing into the name field in the Tags panel. To change the color assigned to the tag, double-click the tag. InDesign opens the Tag Options dialog box. Choose a new color from the Color pop-up menu. Choose Other to display a color picker to define the color.
- If you did not go to the Tag Options dialog box to change the color, press Enter. If you did, click the OK button to close the dialog box. InDesign adds the tag to the list of tags in the Tags panel.
To delete an XML tag, select the tag and choose Delete Tag from the Tags panel menu. When you delete a tag, InDesign displays the Delete Tag dialog box, which asks you which other tag you’d like to apply to the elements corresponding to the deleted tag.
Loading XML Tags
To load tags from an XML file, follow these steps.
- Choose Load Tags from the Tags panel menu. InDesign displays the Open dialog box.
- Select an XML file and click the OK button. InDesign loads the element names from the XML file and creates a tag for each.
Exporting XML Tags
To save tags to an XML file, follow these steps.
- Choose Save Tags from the Tags panel menu. InDesign displays the Save Tags as XML dialog box.
- Enter a name for the file and click the Save button. InDesign writes the tags to an XML file.