{"id":1283,"date":"2013-02-25T13:27:50","date_gmt":"2013-02-25T11:27:50","guid":{"rendered":"http:\/\/www.ozalto.com\/?p=1283"},"modified":"2013-11-07T15:39:48","modified_gmt":"2013-11-07T13:39:48","slug":"how-to-choose-between-xml-import-and-datamerge","status":"publish","type":"post","link":"http:\/\/www.ozalto.com\/en\/how-to-choose-between-xml-import-and-datamerge\/","title":{"rendered":"How to choose between XML Import and Datamerge ?"},"content":{"rendered":"<p>During an InDesign User Group Meeting in Paris, a spectator asked me this simple question : <strong>&#8220;How to choose between XML Import and Datamerge ?&#8221;.\u00a0<\/strong>A vast topic I tried to cover in a short time. I take\u00a0this\u00a0opportunity to speak further and hopefully provide elements of\u00a0a\u00a0response\u00a0to make your final\u00a0choice.<\/p>\n<h4>Context matters<\/h4>\n<p><strong>It&#8217;s all about your layout project, what you have to accomplish and how much you need to keep track of your data.<\/strong> You must rely on you customer ability to provide a data file\u00a0of\u00a0a certain format. <strong>You don&#8217;t handwrite\u00a0XML. You get the output from a dedicated tool<\/strong> (SQL Database, FileMaker\u2026).<\/p>\n<p>If your customer doesn&#8217;t have such tool and refuse to invest, forget XML. Other clients only\u00a0swear by Excel Tables overwhelmed\u00a0with formulas, filters and so many fills that lead to randomly extractable CSV format.<\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/www.ozalto.com\/wp-content\/uploads\/2013\/02\/exportFichiersExemple.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-1278\" title=\"exportFichiersExemple\" alt=\"export Fichiers Office vs Database\" src=\"http:\/\/www.ozalto.com\/wp-content\/uploads\/2013\/02\/exportFichiersExemple.png\" width=\"450\" height=\"200\" srcset=\"http:\/\/www.ozalto.com\/wp-content\/uploads\/2013\/02\/exportFichiersExemple.png 450w, http:\/\/www.ozalto.com\/wp-content\/uploads\/2013\/02\/exportFichiersExemple-300x133.png 300w, http:\/\/www.ozalto.com\/wp-content\/uploads\/2013\/02\/exportFichiersExemple-120x53.png 120w\" sizes=\"(max-width: 450px) 100vw, 450px\" \/><\/a><\/p>\n<p>Forget the XML export from Excel. If you are lucky, you will get a functional CSV file. <strong>Prefer the Tab Delimited Text File format, you will avoid may issues.<\/strong> And <strong>if you are really into XML, feel free to use our <a title=\"CSV2XML Script\" href=\"http:\/\/support.ozalto.com\/downloads\/CSV2XML_XML2CSV.zip\">CSV2XML<\/a> script<\/strong> in our downloads section. As you see, you have many options here and yet the question is still hanging out there : How to choose between XML Import and Datamerge ?<\/p>\n<h4>BusinessCards, Mailing ?<\/h4>\n<p style=\"text-align: center;\"><a href=\"http:\/\/www.ozalto.com\/wp-content\/uploads\/2013\/02\/BusinessCards.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-1279\" title=\"Business Cards\" alt=\"Business Cards\" src=\"http:\/\/www.ozalto.com\/wp-content\/uploads\/2013\/02\/BusinessCards.png\" width=\"450\" height=\"238\" srcset=\"http:\/\/www.ozalto.com\/wp-content\/uploads\/2013\/02\/BusinessCards.png 450w, http:\/\/www.ozalto.com\/wp-content\/uploads\/2013\/02\/BusinessCards-300x158.png 300w, http:\/\/www.ozalto.com\/wp-content\/uploads\/2013\/02\/BusinessCards-113x60.png 113w\" sizes=\"(max-width: 450px) 100vw, 450px\" \/><\/a><\/p>\n<p><strong>Choose Datamerge!<\/strong> It&#8217;s so easy to set. A few tags et voil\u00e0! In just seconds, you get all your 2500 entries. A few minutes and a PDF Export later, it&#8217;s done !\u00a0<strong>Datamerge fits well with Business Cards, mailing, letterheads.<\/strong><\/p>\n<h4>Tables, directories ?<\/h4>\n<p style=\"text-align: center;\"><a href=\"http:\/\/www.ozalto.com\/wp-content\/uploads\/2013\/02\/YellowPages.png\"><img decoding=\"async\" title=\"YellowPages\" alt=\"Yellow Pages\" src=\"http:\/\/www.ozalto.com\/wp-content\/uploads\/2013\/02\/YellowPages.png\" width=\"450\" height=\"238\" \/><\/a><\/p>\n<p>Datamerge is not intented to generate tables and directories. <strong>If you need to do so, feel free to use our specific scripts such as <a title=\"CSV2TABLE\" href=\"http:\/\/support.ozalto.com\/downloads\/CSVTOTABLES.zip\">CSV2Table<\/a> or <a title=\"InlineMerge Script\" href=\"http:\/\/support.ozalto.com\/downloads\/inlineMerge.zip\">InlineMerge<\/a>.<\/strong>\u00a0<strong>\u00a0<\/strong>if\u00a0still\u00a0not\u00a0adequate, maybe it&#8217;s time to use XML.<\/p>\n<h4>Catalogs, datasheets ?<\/h4>\n<p style=\"text-align: center;\"><a href=\"http:\/\/www.ozalto.com\/wp-content\/uploads\/2013\/02\/Catalog.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-1282\" title=\"schema catalogue\" alt=\"schema catalogue\" src=\"http:\/\/www.ozalto.com\/wp-content\/uploads\/2013\/02\/Catalog.png\" width=\"450\" height=\"238\" srcset=\"http:\/\/www.ozalto.com\/wp-content\/uploads\/2013\/02\/Catalog.png 450w, http:\/\/www.ozalto.com\/wp-content\/uploads\/2013\/02\/Catalog-300x158.png 300w, http:\/\/www.ozalto.com\/wp-content\/uploads\/2013\/02\/Catalog-113x60.png 113w\" sizes=\"(max-width: 450px) 100vw, 450px\" \/><\/a><\/p>\n<p>Say bye to datamerge unless you are using dedicated plug-ins able to extend this feature. <strong>Start using XML.<\/strong><br \/>\n<strong>Setting a XML template is generally more time-consuming than preparing Datamerge documents.<\/strong> Although both features are based on tagging, they are really different. <strong>To get nice continuous flows throughout several pages, you have to use a particular logic based on threaded frames.<\/strong><\/p>\n<p>Eventually, <strong>it&#8217;s likely that the XML structure you received from the client will not match your requirements<\/strong>. You have only two options left :<\/p>\n<ul>\n<li>Harass the IT guy in charge of the XML Export so he fits your needs (good luck with that \ud83d\ude42 )<\/li>\n<li>Use the XSLT language to make the XML compliant to your own structure<\/li>\n<\/ul>\n<p><strong>Yes, that&#8217;s complex but hey, so is your template\u2026:D<\/strong><\/p>\n<h4>Updates<\/h4>\n<p>If data updates is critical in your project, <strong>forget datamerge right away.<\/strong> This technology is one way only. Once it&#8217;s done, you get a document with all your records nicely generated. However InDesign has no clue on what&#8217;s in it. In other words,<strong> if you change the CSV content, InDesign is unable to locate the data that needs to be updated.<\/strong> All you have to do is start over.<\/p>\n<p><strong>However, the XML import keeps a connection between the data and where it&#8217;s being used.<\/strong> In case you choose to import the XML file as a link, InDesign will warn you in the Links palette. Then <strong>a simple click on &#8220;Update the link&#8221; will reload the XML smoothly.<\/strong> Take care not to idealize XML update though. If the structure of your XML has been changed, you\u00a0probably\u00a0won&#8217;t\u00a0have\u00a0enough\u00a0fingers to count\u00a0damages. <strong>Keep this feature for changes that only affect contents<\/strong><strong>.<\/strong><\/p>\n<h4>Conclusion<\/h4>\n<p><strong>Datamerge is really a powerful tool that will fit well for simple structures.<\/strong>\u00a0<strong>If your layout is complex or requires conditional parameters ( if X then Y ), then choose a combination of XML and XSLT<\/strong> or a plug-in designed for structured data layout.<\/p>\n<p><strong>The inhe<\/strong><strong>re<\/strong><strong>nt limitations of these technologies can be overriden thanks to scripting.\u00a0<\/strong>Now I am testing an automated layout based on a combination of library assets and scripting. I still use XML to store my customer data. However I am not calling InDesign XML Engine. I am parsing the XML file and automatically inject data where it has to be. <strong>What&#8217;s the point of redesigning an injection process when InDesign can do it by its own ?<\/strong> I save so many time preparing my document !<\/p>\n<p>Ok, <strong>I hope this post will help you to\u00a0make your final choice between XML Import and Datamerge<\/strong> and good luck to all of you ! If you feel like you need more custom advices, feel free to <a title=\"Contact\" href=\"http:\/\/www.ozalto.com\/en\/about\/contact-2\/\">contact us<\/a> !<\/p>\n<p>Loic<\/p>\n","protected":false},"excerpt":{"rendered":"<p>During an InDesign User Group Meeting in Paris, a spectator asked me this simple question : &#8220;How to choose between XML Import and Datamerge ?&#8221;.\u00a0A vast topic I tried to cover in a short time. I take\u00a0this\u00a0opportunity to speak further and hopefully provide elements of\u00a0a\u00a0response\u00a0to make your final\u00a0choice. Context matters It&#8217;s all about your layout [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":1285,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[43,42,5,15],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"http:\/\/www.ozalto.com\/en\/wp-json\/wp\/v2\/posts\/1283\/"}],"collection":[{"href":"http:\/\/www.ozalto.com\/en\/wp-json\/wp\/v2\/posts\/"}],"about":[{"href":"http:\/\/www.ozalto.com\/en\/wp-json\/wp\/v2\/types\/post\/"}],"author":[{"embeddable":true,"href":"http:\/\/www.ozalto.com\/en\/wp-json\/wp\/v2\/users\/2\/"}],"replies":[{"embeddable":true,"href":"http:\/\/www.ozalto.com\/en\/wp-json\/wp\/v2\/comments\/?post=1283"}],"version-history":[{"count":0,"href":"http:\/\/www.ozalto.com\/en\/wp-json\/wp\/v2\/posts\/1283\/revisions\/"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.ozalto.com\/en\/wp-json\/wp\/v2\/media\/1285\/"}],"wp:attachment":[{"href":"http:\/\/www.ozalto.com\/en\/wp-json\/wp\/v2\/media\/?parent=1283"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.ozalto.com\/en\/wp-json\/wp\/v2\/categories\/?post=1283"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.ozalto.com\/en\/wp-json\/wp\/v2\/tags\/?post=1283"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}