Chapter 36. Working with XML

IN THIS CHAPTER

  • Understanding XML

  • Creating XML tags in InDesign

  • Importing XML tags into InDesign

  • Exporting InDesign documents for use in XML documents

  • Exporting to IDML format

One of the most complex features in InDesign is its set of Extensible Markup Language (XML) features. XML is a structured language that essentially treats document components as data, so you can manage them through a database. The XML tools in InDesign let you treat InDesign documents as sources for XML databases, which are then linked into Web pages, PDF files, CD-ROMs, and so on. They also let you create InDesign templates into which you flow data from XML files, all formatted and in the proper frames.

The key to XML is the fact that it's extensible. You create the tags, or labels, for various kinds of content (these are called document type declarations, or DTDs) based on what makes sense for your content. Then you specify what happens to each of the types of labeled content in terms of what's published, how it's presented, and so on. Compare that to the more rigid HTML and PDF systems, where there are only certain tags available that cannot be changed, and the presentation is fixed based on the label chosen.

XML code is similar to HTML in the sense that there are tags surrounded by angle brackets (< and >) and that commands and labels are turned on and off (such as <standardHeader> at the beginning of a header item and </standardHeader> at the end of it). Comments begin with <!--

Get Adobe® InDesign® CS5 Bible 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.