2 Replies Latest reply on May 6, 2010 1:36 AM by gopaljay78

    Move xml element from Structure pane in ID CS4

    gopaljay78 Level 1



      I need the following action in ID CS4, to move xml element from its structure pane to a new text frame.


      My action is:


      1. Select the xml element in Structure.

      2. Run the script to identify the selected element in Structure.

      3. Move the xml element to separate New text frame.


      I wrote the script for this three step. But I am unable to move the selected xml structure to new text frame.



      My code is:


      var myXMLElementA = app.selection[0];
      var myTextFrameA = app.activeDocument .pages[2].textFrames.add({geometricBounds:[0, 0, 160, 160], contents:" "});
      myXMLElementA.move(LocationOptions.atBeginning, myTextFrameA.insertionPoints.item(0));



      Can anyone help me on this.