0

I'm a novice to XML (and code in general), hence I apologise in advance if this question sounds dull or redundant.

I'm working on project which output will be a printed document with about 750 directories. I'm working on Indesign with imported XML file. I structured the following, simple process:

  1. Authors upload content on Wordpress;
  2. content is exported into separate XML files (all with same structure) into one folder on my computer;
  3. XML file is imported into Indesign to then map XML tags with styles.

However, Indesign can handle one single XML file only, therefore I'd need to combine all the XML from the folder into a single one. Considering the amount of XML file (about 25), I could do this manually, but I saw an opportunity to learn something new and automate the process.

I'm sure there are multiple ways to go about this one. I'd imagine you can either combine all XML file and output a new one in some programmatic fashion (action?), or have a simple XML file which sources all the others from the folder on my computer. I'm aware of XSLT too, but I couldn't figure out a way of using it.

On a secondary note, these XML file don't feature some characters, such as ’and I was wondering if it is possible to perform a find/replace while merging the multiple xml files into the single one.

I hope to find a solution here and learn something new!

Many thanks, a

  • have you tried the "Append" option when importing XML? This allows you to "add" to the XML that already exists in the layout. – user1754036 Jul 07 '16 at 16:08
  • Indeed, Indesign can only deal with one XML at a time. However sometimes split data into many XMLs can help as InDesign will not handle well uber xml files. So you may want to generate your 25 exports and then copy/paste structure elements into the min document.So you can see when InDesign starts suffering. A long time ago I worked on a huge directory and indesign couldn't absors all the data. We always ended crashing it after hours of processing. And even then having long story makes indesign very slow. – Loic Jul 08 '16 at 10:11
  • Thanks both. I was actually wondering a few days ago wether the 'append' import option could help – indeed it does, but a consequential issue was that when appending it seems to me not possible to control how indesign deals with the appended xml white spaces (tabs, newlines,...). Yet a secondary problem I had were some non ASCII char and spaces left into the xml from the export. But I have now programmed a little script using RegReplace which cleans & format the xml exports like a charm, hence the I shall now simply import multiple xml and append them! Thank you! – Antonio Bertossi Jul 08 '16 at 10:49

0 Answers0