2 Replies Latest reply on Oct 7, 2011 3:04 AM by Colin Flashman

    Product Database / Catalog - Importing XML


      I'm trying to pulling together some items for a mini catalog.


      I came across this: http://automator.us/examples-04.html

      I did everything up until it tells you to open Automator, which is mac only software and I'm on a pc. I thought there might be some way to import my work through XML but I don't know what I'm doing.




      When I'm trying to export from FileMarker to XML, are there certain options I should be choosing or avoiding? I don't know any better.



      I saw a brief tutorial from some lady who was importing a XML to linked texted boxes and this was her import options. She seemed to know what she was talking about, so I copied her options. I don't know if it works for me though.



      And this is the following error I get.




      I don't know if this is what my XML file should look like or not. Maybe I messed it up when I exported it, I don't know.



      This is the spreadsheet/database/thing I've been working with. When it failed to import the XML to Indesign the first time, I thought maybe I had to create seperate XML files for each field/column. Would that work? And what would I have to do to get it to work in Indesign, because right now all I have set up in the template is the script labels for the SKU item numbers. Would it still work or do I have do something completely different?


      Or if you guys know of another way I could do this, I'm all ears.



        • 1. Re: Product Database / Catalog - Importing XML
          Joel Cherney Level 5
          Or if you guys know of another way I could do this, I'm all ears.


          It's not 100% clear from your description, but it seems to me that you could save CSV out of your spreadsheet and use Data Merge instead of XML Import.  I don't think that your XML output from Filemaker has been processed enough to place into InDesign... or processed at all, really.  Your XML export from FMP is all in ROWs and COLs which is great to move the data into another FM database but not useful for importing into ID. It's been, um, a decade since I lasted worked with Filemaker but I will look into your XML export options to see if you can get good clean XML out of Filemaker without doing any XSLT yourself.


          I've had some experiences with XML in ID that were extremely smooth & easy but that's because (I've learned recently) my XML content was pretty much already perfect.


          I note that you have a "Product Image" column - I can't recall exactly how to use that kind of info in a data merge but I think you need not just the filename of the JPG but the actual path to it - the Data Merge section of Help file might be useful for you here.

          • 2. Re: Product Database / Catalog - Importing XML
            Colin Flashman Adobe Community Professional

            I've had a look at the linked tutorial from the OP and it doesn't look like anything that couldn't be done just using  data merge which ships with indesign. XML is more useful if the repeating data is of varying lengths or paragraphs; or if the records have to flow in the same text box. the linked tutorial is behaving in a similar fashion to data merge when asked to perform multiple records.


            what is complicating matters is that a vital component of the tutorial (automator) can't be done on the OP's machine because he is working within Windows rather than MacOS. This is like trying to start a car with no engine.


            XML has a steep learning curve, even when great resources are available such as the following books:


            • A Designer’s Guide to Adobe InDesign and XML by James Maivald; and
            • InDesign CS5 Automation Using XML & Javascript by Grant Gamble


            so to use the tutorial without automator and a good understanding of XML is a recipe for agony. FWIW i constantly struggle with XML, but when it works, it works brilliantly... when it works!!!


            a "poorer man's solution" may be to take a CSV file (i've no idea how big the OP's file is) is to use a CSV to XML converter. one is online at http://creativyst.com/Prod/15/ but has a limit of 100K. the XML file still needs "massaging" afterwards as the converter puts many unwanted spaces within the tags.


            but a cursory look at the XML produced by the OP looks wrong. it doesn't look neat or structured, and lines begin and end in odd spots. well-formed XML should look like:


            <?xml version="1.0" encoding="UTF-8"?>












            There are many ways to put  data into indesign. XML is one. Data Merge is another, third party plug-ins are another (such as emcatalog), or (unbelievably) do the merge in Word using its directory merge, and then place this file as text and format like any normal artwork.


            if the OP is preparing an intense product catalog (i mean hundreds of pages long), then i'd persevere with XML... but i'd use a different resource as a guide - mainly the two books i've mentioned in this reply.