Importing XML

There are several ways to work with Adobe's XML import capabilities. We'll start with the process that has been documented in a short Adobe tutorial, Format XML in an InDesign Template, which you can download and print for reference.

Doing It Adobe's Way: The Placeholder Approach

The XML Import Options dialog with annotations

Figure 2. The XML Import Options dialog with annotations

Note

if you import XML without any preexisting maps for paragraph styles, all the imported content will look like the default style that you get when you make a new paragraph without applying a style to it (the Basic Paragraph Style).

Adobe expects you to create a model in your InDesign document for your XML content.[1] The model is made of placeholders, which are XML elements that indicate what the structure of the incoming XML will be and how you want it to look.

This is a very sensible approach when you are starting out with XML and want to get a feel for how the imported XML will be formatted in InDesign.

Let's walk through the steps of the placeholder approach, using the course description content.

Model the XML you want

Get some structure into InDesign

The basis of your modeling will be a set of XML elements, from an existing DTD or XML file.

If you have XML based upon a DTD, start by importing the DTD[2] into InDesign.

  1. In your InDesign document, click on the Structure pane icon <|> in the very far left bottom corner of the document window. ...

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.