Back

If your email is not recognized and you believe it should be, please contact us.

  • You must be logged in to reply to this topic.Login

XML to InDesign in tabulated form

Return to Member Forum

  • Author
    Posts
    • #92064
      Masood Ahmad
      Participant

      Hi Team,

      Since I haven’t worked on XML, I need your assistance on this.

      I have received a data something like this:
      https://www.jobstoday.co.uk/widget/jobs/;i=21

      and the same needs to be formatted as a Tabulated data not tables i.e.:

      Job ID           Title           Short Description           Salary Description

      As you see only four tags are being used, the rest of the information needs to be ignored. Can you please help me create a workflow to achieve this.

    • #92066
      David Blatner
      Keymaster

      Hi Masood! I think the first step is to learn as much as you can about how XML works in InDesign. Here are some resources to start:
      https://creativepro.com/formatting-text-xml-indesign.php

      All you need to know about using XML with Adobe InDesign

      and Chad Chelius’ title at Lynda.com:
      https://www.lynda.com/Design-tutorials/Creating-InDesign-Booklet-Using-XML/435134-2.html

    • #92067
      Masood Ahmad
      Participant

      Thanks David for your suggestions, but I’m looking for an actual workflow. I tried to some extent but the data is all coming in a single paragraph:

      10932203	England, Cumbria, Windermere	Negotiable	Recruitment Genius Ltd 	0006441610932139	Carlisle	£Very attractive salary	TheSmartList	TSLJM97510931829	Burnley	£7.20 - £8.49 per hour	No Risk Recruitment	5891RR10917145	England, Cumbria, Kendal	£20000 - £25000 per annum	Recruitment Genius Ltd 	0006441210917106	England, Cumbria, Kendal	£15000 per annum	Recruitment Genius Ltd 	0006440910917102	Preston	Dependent On Experience	TheSmartList	TSLCB078910917062	Lancashire	Competitive Rates of Pay	Hawthorn Estates (NW) Limited	Reference10917000	Blackpool, Lancashire	Competitive Rate Of Pay	Allitt Estate Agency	Reference10916975	England, Lancashire, Preston	£14000 - £14500 per annum	Recruitment Genius Ltd 	00064397

      …and when I tried it in a Table, every row is coming as a separate Table.

      Any more suggestions, please

    • #92068

      Masood,

      I’m going to start exploring an XML work flow later this year. Keep me posted on what you find and any other resources you used for learning.

    • #92070

      Some thoughts.

      You could use an XML editor (though ID in theory could also do this) and write an XSLT that would strip the non-relevant data and convert to a TAB delemited txt file and merge it into a table, then autoflow the table.

      You could use one of the on-line or desktop applications that will convert the XML to a CSV or tab delimited text file and merge it into a table, then autoflow the table.

      There is a script to do this merge to a table available. The results would be like this:

      https://www.dropbox.com/s/7oe68dpxozfcnli/capture-000802.png?raw=1

      Here’s a ZIP with the data merge template, the script I mentioned and the resulting merge file.

      https://www.dropbox.com/s/ttl3iid1x29qeeh/Desktop.zip?dl=0

      Mike

    • #92073
      Masood Ahmad
      Participant

      Hi Mike,

      Thanks, it worked. But as I said I want it in a Tabular form. Well I know I can convert the Table to Text, which is the last option I’ll have.

      Here is the snapshot of the desired output:
      https://www.dropbox.com/s/7fv9zcs8v5vlrfq/Final%20Output.jpg?dl=0

      Secondly, when I tried Data-Merge in Tables on a new page, the Data-Merge created 50+ pages i.e. one for each. Even though the text-frame was a Master Text-Frame. Is this the default behaviour of Data Merge or am I missing something.

      Similarly, when I tried the Data-Merge on a Tabular text, the output was 1000+ pages. Each record was on a separate page.

      The script you have shared here is dedicated to this workflow or will it work with any data/csv file.

      @David, is there any in-depth course on Lynda for both XML and Data-Merge. I would like to go through it.

      • #92076

        Then do not use the template. Just use the data file and place your placeholders and run the merge to a new document.

        You’ll need a different script for in-line merges because with multiple records per page, you will have one text frame per record and these frames are not linked. There are free scripts that will link those frames. Then you would need to delete all pages but the first page, delete all the frames except the first frame, increase its size to the page margins top/bottom, then autoflow onto a new page.

        The problem with not using tables is you will find some/many of the descriptions are too long to fit the space from your screen shot.

        The XML is also not well-formed. The minimum you need to do is to encode the ampersands to their html counterparts. That will likely allow ID to use the XML.

    • #92074
      David Blatner
      Keymaster
    • #92075
      Masood Ahmad
      Participant

      Thanks, I’ll check this out.

    • #92156
      Masood Ahmad
      Participant

      Hello and warm greetings to all of you.

      I was away from my computer from the last four days due to some medical urgency, but now I’m back with a boom.

      @David, I gone through your title on Data Merge and it was excellent. I was missing some of the bits which got answers very well. I already had the “inlineMerge.jsxbin” script with me. Since I was unaware about its use, I have kept it in the ‘To Delete’ folder. I never realized it could be so excellent script, thanks to ozalto.com for sharing it free. Now the script is in my Working Scripts folder.

      I can’t understand why Adobe people don’t think this way. Why is there a third party help needed for some basic tasks. These free scripts have made Data-Merge a great tool to use and I suggest Adobe should include these in its next edition.


      @Mike
      , Thanks a lot for reminding me the process.

      After troubleshooting on the subject I went through various processes and somehow I achieved this with the help of my colleague #Mohit Dhiman. I have created a small video (without audio) to understand what I did and hope this will help others to learn.
      https://www.dropbox.com/s/8pzl102ouhjh9o6/xml2indesign.mov?dl=0


      @Jay
      , I hope this will help you up to some extent.

      @David, can you write a workflow on this and post it on the site. I wish to have an in-depth tutorial on the same by someone specialized in xml

      I also came to know a title on Lynda “https://www.lynda.com/Design-tutorials/Creating-InDesign-Booklet-Using-XML/435134-2.html”, and hope to go through it soon.

    • #92158

      Masood, it seems, that you do this without a XSLT. I’m pretty sure, the removing of the tabs could be made simpler. But your video looks interesting.

      Could you provide demo-files as well? > 10 lines would be enough.

      Thanks
      Kai

    • #92159
      Masood Ahmad
      Participant

      Here you go…
      https://www.dropbox.com/s/cz4szbq3ge60sjr/xml2InDesign_WorkingFiles.zip?dl=0

      You’re right. I’m not aware of XSLT but trying to have my hands on it.

Viewing 10 reply threads
  • The forum ‘General InDesign Topics (CLOSED)’ is closed to new topics and replies.
Forum Ads