Mobile app version of vmapp.org
Login or Join
Jennifer810

: Populate InDesign document with XML I am looking to populate an InDesign document with multiple pages from an XML file, with one textbox per-page and a page break after each page's text. This

@Jennifer810

Posted in: #AdobeIndesign #Xml

I am looking to populate an InDesign document with multiple pages from an XML file, with one textbox per-page and a page break after each page's text.

This is what the XML file looks like:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Root>
<all-pages>
<page>Text for page one</page>
<page>Text for page two</page>
<!-- [and so on...] -->
</all-pages>
</Root>


The output I'd like to achieve is illustrated below. This was created by clicking and dragging, but I have several pages (412) and so am looking for a way to automate this.



I've read several guides but nothing seems to deal with a simple test case like this. Any help would be very much appreciated, thank you!

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Jennifer810

1 Comments

Sorted by latest first Latest Oldest Best

 

@Odierno310

You don't need to program anything. This behavior can be easily obtained with a bit of adjustment to your layout and tagging plus setting "Clone Repeating Text Elements".

Basically you need this in your InDesign document:

<allPages>
<pageSet>
<page/>[[here stands the page break in the layout]]
</pageSet>
</allPages>


Then your input XML can simply be:

<allPages>
<pageSet>
<page/>
</pageSet>

<pageSet>
<page/>
</pageSet>

<pageSet>
<page/>
</pageSet>
(etc.)
</allPages>


You have to use an enclosing node so the page break character is part of the cloning process.

Alternatively, if all pages have identically structured contents (i.e., start with the same paragraph style) you can just set the paragraph style of the first contents of any page to start on a new page (Paragraph Styles > Keep Options > Start Paragraph: On Next Page). Don't forget to map the tag to the paragraph style (XML structure pane menu > Map Tags to Styles). That way when flowing any contents that uses the style will be pushed to the next page.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme