8 Replies Latest reply on Nov 4, 2015 8:26 AM by Kerrigan Marois

    Importing XML

    Kerrigan Marois Level 1

      Hey everyone, I am brand new at importing xml and have been working diligently to come up with ways to be faster with my workflow. I work on a 100 page catalog 2x a year and currently copy/paste the info from xcel a few hundred times in order to complete the data.

       

      Here is the skinny, I am writing an xml block in dreamweaver that looks like this:

       

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

      <root>

          <Aside>

          Pertinent Info 


          Testing Headline

          
Bacon ipsum dolor amet pork loin jowl reprehenderit, sirloin frankfurter non incididunt commodo shoulder short loin consectetur nostrud 
www.thingorilla.com 
612.298.2059 

 Pertinent Info 
Testing Headline 
Bacon ipsum dolor amet pork loin jowl reprehenderit, sirloin frankfurter non          incididunt commodo shoulder short loin consectetur nostrud 


              www.webaddress.com

          555.555.5555 



          </Aside>

      </root>

       

      I have the character styles built and used nested styles for my paragraph to format the text as this:

      Pertinent Info

      Testing Headline
      Bacon ipsum dolor amet pork loin jowl reprehenderit, sirloin frankfurter non incididunt commodo shoulder short loin consectetur nostrud
      www.webaddress.com
      555.555.555

       

      When I import the xml, I am selecting to remove whitespace elements to no avail, every tab and new line from the xml produces a tab or full carriage return and my nested styles are set up using forced line breaks...Needless to say, I'm quite stumped as to what I'm missing here. I know that I can include unicode for soft returns, but that defeats the purpose of automation if I have to include that 10k times.

       

      I really appreciate anyone that can help me achieve this!

        • 1. Re: Importing XML
          Kerrigan Marois Level 1

          bump?

          • 2. Re: Importing XML
            Kerrigan Marois Level 1

            final bump.

            • 3. Re: Importing XML
              joet082964 Level 3

              I wonder if someone of FrameMaker Discussions can help? It is more XML savvy I believe.

              • 4. Re: Importing XML
                Steve Werner Adobe Community Professional & MVP

                Almost no XMP workflow people come here, I'm afraid. Just not a common workflow.

                • 5. Re: Importing XML
                  MW Design Level 4

                  I'm not sure what you are doing, nor why writing this in DM. generally I would use an Access (or other) database or an XML editor--if I was gong to actually author manually.

                   

                  The line break (soft return) needs to be the html entity &#x2028;

                   

                  If I am understanding your xml (and/or what you are wanting to accomplish), the xml would be like this:

                   

                  <?xml version="1.0"?>

                  <root>

                  <Aside>

                  Pertinent Info &#x2028;Testing Headline &#x2028;Bacon ipsum dolor amet pork loin jowl reprehenderit, sirloin frankfurter non incididunt commodo shoulder short loin consectetur nostrud &#x2028;www.thingorilla.com &#x2028;612.298.2059 &#x2028;Pertinent Info &#x2028;Testing Headline &#x2028;Bacon ipsum dolor amet pork loin jowl reprehenderit, sirloin frankfurter non incididunt commodo shoulder short loin consectetur nostrud&#x2028;www.webaddress.com &#x2028;555.555.5555

                  </Aside>

                  </root>

                   

                  I'm not around much anymore, but I will try to look in to see if this is what you want/need.

                   

                  Mike

                  • 6. Re: Importing XML
                    Dirk Becker Level 4

                    InDesign's XML support has several problems, the mentioned lack of treatment for "ignorable white space" is one of them. There are ways to work around most of the problems, but they involve even more technologies, e.g. either an XSLT transformation during import to clean up the mess, or scripting. It is also important to know the original source of the data and implications from upstream conversions so you may choose different approaches.

                     

                    Whole books are dedicated to InDesign and XML, e.g. Jim Maivald's "A Designer's Guide to Adobe InDesign and XML". The title clearly states the audience, for my taste as a programmer it goes too deep into basics and manual adjustments so I've only browsed thru it. Just revisited, yes it covers many details how to appropriately structure the XML (more tags than in your data) and how to utilize that structure e.g. by mapping tags to styles, how to invoke XSLT on import and so forth.

                     

                    As Mike mentions, there are definitely better tools for editing XML, at much higher levels of sophistication. Probably overkill in your case of twice a year. If your data originates in Excel, I'd instead take a completely different approach: place the table somewhere out of sight (e.g. in a master page) and use a script to copy contents from the individual cells into your layout, or even build the layout from scratch. Advantage here is that there are plenty knowledgeable folks next door at the scripting forum to either give you hints and code snippets, or you could also hire one of them to write the script in a few hours.

                     

                    If you prefer to continue the XML way, most discussion regarding XSLT takes place outside Adobe forums. LinkedIn also has at least two groups dedicated to XML with InDesign, but they are more about sharing experiences and the technology in general, and even the more vivid one has only few posts per month. https://www.linkedin.com/grp/home?gid=2996628

                     

                    Dirk

                    • 7. Re: Importing XML
                      MW Design Level 4

                      Thanks for jumping in, Dirk.

                       

                      I was also remiss in not mentioning a couple things. One, there are customizable XSL/XSLT on the web that deal with the XML out of Excel. Even so, Excel would be my last choice for a database of products. But if I had to write this by hand, there is no advantage to doing so in DM or even an XML authoring tool versus just copying and pasting directly in ID and formatting. Perhaps even a detriment.

                       

                      Using Excel as the source, and seeing how it is an incoming stream, I would recommend looking at either the merge plug-ins for ID, or, if the budget would allow, one of the catalog plug-ins. This would allow you to use a simple CSV type of file (I prefer tab-delimited). I am partial to the offerings from Em Software. For CSV-types of files, it is simply hard to beat their EmData product. Not knowing the data nor the layout, it is impossible to know whether a catalog plug-in would be better. Support is great from them.

                       

                      65Bits' EasyCatalog is another option to the above. I haven't used their products and have no recommendation.

                       

                      Data-merge types of products versus catalog products. The level of complexity and cost changes between data-merge types of plug-ins and catalog plug-ins. I would recommend looking at both company's offerings for each type of solution and also communicate via email with them about your specific needs.

                       

                      As mentioned, I use Em Software's stuff. One can do quite a lot with even something as simple as their InData (CSV-type of merging) product. I do.

                       

                      Mike

                      • 8. Re: Importing XML
                        Kerrigan Marois Level 1

                        I really appreciate everyones feedback.

                         

                        As I'm currently diving into this more and more I am sure I will find other use cases for it. Mostly I am trying to eliminate some of the drudgery of copying a set of cells from xcel and pasting them into indesign and using GREP/Nested styles to achieve the look.

                         

                        Again, you guys gave me plenty of resources to look into, thanks a bunch!