Mobile app version of vmapp.org
Login or Join
Angela777

: Generate InDesign content using XML I'm trying to generate some content in InDesign CS5 by importing XML data, but I can't figure out how to do it. Here's what I have: XML <stuff>

@Angela777

Posted in: #AdobeIndesign #Xml

I'm trying to generate some content in InDesign CS5 by importing XML data, but I can't figure out how to do it. Here's what I have:

XML

<stuff>
<person>
<name>John</name><age>42</age>
</person>
<person>
<name>Oscar</name><age>39</age>
</person>
</stuff>


And here's what I want the result to look like:

InDesign

Person: John, 42
Person: Oscar, 39


How do I go about doing this?

10.03% popularity Vote Up Vote Down


Login to follow query

More posts by @Angela777

3 Comments

Sorted by latest first Latest Oldest Best

 

@Sent7350415

Since you've got "Person: " and colons added to your original data, I'd go with creating apropriate XSLT to transform your XML before it'll be imported to InDy (there's an option to treat XML with selected XSLT when importing XML). Other than that it's just simple importing XML into InDy and mapping specific elements to specific styles.

To sum things up: use XSLT transformation while importing XML.

That's not the only way, but I'd go with that since you'll going to need XSLT knowledge (even basic) if you plan to use XML extensively in your workflow. I know XSLT is not a convenient and straightforward technology (could be designed more with people in mind) but it works.

By the way: to add "Person: " prefix before each paragraph, you could set your paragraph to be "bulleted" list with bullet set to empty character and "Text before" set to "Person: ". Try this :).

10% popularity Vote Up Vote Down


 

@Tiffany317

You have to set up the structure in InDesign first, before you import the XML data. The procedure is a bit complex for an answer here, but you can find a good introduction here on Adobe TV.

If you're going to be getting into XML much, I highly recommend you spend time on InDesignSecrets.com (do a search on XML) and that you get and read James Maivald's "A Designer's Guide to Adobe InDesign and XML", not only the best introduction to XML for InDesign users, but also an excellent reference to keep on hand.

10% popularity Vote Up Vote Down


 

@Gail6891361

You can do this with data merge, but as far as I know, you must use CSV or tab delimited format, not XML.

The data merge palette is under the window->automation menu. You specify the data file, and then you can drag data field markers into your text boxes and style appropriately, then merge the files. Multiple records in a single document are not possible AFAIK when you are using a spread layout.

CS4 docs are here: ( help.adobe.com/en_US/InDesign/6.0/WSa285fff53dea4f8617383751001ea8cb3f-6c3ca.html#WSa285fff53dea4f8617383751001ea8cb3f-6c3ba )

and a real-world tutorial is here:

( tv.adobe.com/watch/instant-indesign/automating-a-catalog-with-data-merge/ )

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme