1 Reply Latest reply on Mar 15, 2016 9:33 AM by Loic.Aigon

    Is this possible Add XML Tag to Table columns

    natrev Level 3

      Hi EveryOne!

       

      I am the new baby to this indesign forums. I need apply XML tag to each and every table columns (name likely test1,test2...)

       

      Please help me out this problem or kindly correct my codes.

       

      -yajiviki

       

      My code.

       

      var docRef=app.activeDocument;
      var ColLen=app.activeDocument.stories.everyItem().tables.everyItem().columns.length;
      for(i=0; i<ColLen; i++){
          var mySel=app.activeDocument.stories.everyItem().tables.everyItem().columns[i];
          app.activeDocument.xmlElements[0].xmlElements.add({markupTag:"Test"+(i+1), xmlContent:mySel});
      }