1 Reply Latest reply on Apr 1, 2013 12:53 PM by regina63

    Creating a simple XML file for importing into Indesign

    FlatheadBeacon Level 1

      Hi all,

      I've been messing around with simple XML files to import into my InDesign documents.


      I only need to create a document with a few fields so that a writer can easily input the information into the XML template and send to me so I can import the information into my InDesign File which will automatically format it.


      Ideally, I would like to use MS Word, since that is what the writers use to write their stories and they are already familiar with, but so far I have not had luck using that program for even my simple tempate. It adds an enormous amount of extra tags and I also found that the "Developer" features were not included in the Mac version of Word.


      So in a nutshell I need to create a template that works across platforms that hopefully doesn't require buying any new software.


      Here is a sample of my template I created in Dreamweaver.




      <Body> </Body>

      <Image href="file://xxxx.jpg"></Image>



      Thank you in advance for any help or ideas…this could be a huge time saver for me.


      - Steve

        • 1. Re: Creating a simple XML file for importing into Indesign

          Hi FHB,

          1. Word is not a good option for text editor which is what you need for clean XML.


          Dreamweaver does XML beautifully. But if you mean the person giving you content doesn't have Dreamweaver they have other no cost options. I'd recommend some of the free text editors out there. On Windows platforms, Notepad utility will work in a pinch. If they are on a Mac, the free Textwrangler from Barebones would work wonders as well. They should be able to open your Dreamweaver-created template, copy their content blocks from Word, paste into the proper tag wrapper in the open template (in TextWrangler or Notepad) and save that notepad/textwrangler file as is. Save your template as .xml, and hopefully with one of the mentioned apps they can keep it in that format ".xml"


          2. It is possible they will STILL import unwanted wild characters that throw off your XML, even copying into TextWrangler and Notepad, but you'll need to look in Dreamweaver to hopefully spot these hidden characters and deal with them on an individual basis. Some special characters like tabs, line breaks, register marks, trademarks, copyright symbols, etc., will need to be substituted for the proper chaacter code equivelant if Indesign throws up an error on importing the XML. I have a few here:

          ® (registered mark)= &#xAE;


          ™ (trademark)= &#x2122;


          (LINE BREAK) = &#xD;


          (TAB) = &#9;


          © (copyright)= &#xA9;


          3. I think maybe there is some additional required document structure for your XML to work well with Indesign:


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




                <Body> </Body>

                <Image href="file:///Users/administrator/Desktop/images/xxxx.jpg"></Image>



          Note that the path to the image file has to be relative to where the XML document is living at the time it is imported into Indesign (or else an absolute path, like an HTTP URL).


          Good luck.