3 Replies Latest reply on Aug 19, 2016 3:55 AM by karthiks94217840

    How can we Move the Contents of an xml element into text frame label in inDesign Script

    karthiks94217840 Level 2

      Dear Friends,

       

      My Requirement is::==>> Move the Contents of an xml element into text frame label ("format 1") by inDesign Script,

      But  XML Structure of InDesign File should not be change & Data in XML Structure should remain as was before.....

       

      My codeing is below:

       

      var myDocument = app.activeDocument;  
      var xpath = "//book-meta/book-title-group"
      var frameName = myDocument.textFrames.itemByName("format 1");
      var xpathTag = myDocument.xmlElements[0].evaluateXPathExpression(xpath);
      var selectTag = myDocument.select(xpathTag)
      
      
      Move_element(frameName, xpathTag)
      function Move_element(frameName, xpathTag){
          
          var placeText = xpathTag.placeXML(frameName);
          
      }
      

       

      also screenshot is below:

       

      Untitled.png

       

      Please suggest friends,

       

      Thanks in Advance

      KS