2 Replies Latest reply on Dec 7, 2015 4:28 AM by sarfrazm7834471

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

    sarfrazm7834471

      var XMLFile = File.openDialog ('Select XML Files...');

      var doc = app.activeDocument;

              if(!app.documents.length)

              {   alert("ERROR: Document not Opened");

                   return;

              }

              //doc.importXML(XMLFile);

            

              var firstFigureNode = doc.xmlElements[0].xmlElements[1].xmlElements[0];

              var lableNode = firstFigureNode.xmlElements[0];

              var lableNodeText = lableNode.contents;

            

              var myFrame = doc.textFrames.add ({geometricBounds:[3, -13, 13, -3]});

              lableNodeText.move(LocationOptions.AFTER, myFrame.texts[0]);

       

      ========================================================

      My Requirement is::==>> Move the Contents of an xml element into text frame by inDesign Script, But  XML Structure of InDesign File should not be change & Data in XML Structure should remain as was before.....

       

      I have tried above code but it's not working.........

      Please anyone can help me, By solving this problem.....