title: Importing to InDesign from XML
body: <p>I have asked a similar question before, but didn't get very good results. I've looked into it a little more and I think this is the best way to tackle it. However, I'm stuck on the final part of the question, so any assistance would be gratefully received:</p>
  
  <p>I am currently working on a new book which comprises a large amount of data. The data already exists in a MySQL database, and I'm fairly certain that I can import the information relatively easily into Adobe InDesign using the XML file format. </p>
  
  <p>However, my problem is that each item in the database has a unique number (five digits in length). The last two digits of this number are used to colour a simple bar code as follows:</p>
  
  <pre><code>Top Row &gt; Penultimate Digit
  Second Row &gt; Last Digit
  Third Row &gt; Penultimate Digit
  </code></pre>
  
  <p>The digits 0 to 9 are assigned with a specific colour and the bars are coloured accordingly. For example, the number 43256 would result in the barcode looking lik RED GREEN RED.</p>
  
  <p>Does anyone know how I might be able to auotmate this process using InDesign? The database contains more than 2,500 items, and I do not want to manually go through each one and assign the colours to the barcode.</p>
  
  <p>Any thoughts and comments would be most welcome.</p>
  
  <p>Thanks and kind regards,
  Ben.</p>