2 Replies Latest reply on Oct 26, 2012 12:42 AM by hurix@123

    xml with box text

    hurix@123

      Hi,

       

      Below is my xml code

       

      <box>

      <p><i>Tariq&#x00101;t:</i> At 3:45am sharp, all 250 students of the.</p>

      <p><i>Zi&#x00101;rat:</i> Every Thursday evening</p>

      <p><i>Tasawwuf</i> in poetry: During the first week</p>

      </box>

       

      followig is JS code:

       

      var mydoc = app.activeDocument;

      var rootElement = mydoc.xmlElements.item(0);

      var linkElementList = rootElement.evaluateXPathExpression("//box/p");

      for(var lp=linkElementList.length-1; lp>=0; lp--){

              var myElement = linkElementList[lp];

                      var myTextframe = myElement.placeIntoInlineFrame(["30p","25p"]);

          }

       

       

      All the boxed paragraph<p> lien in one textbox frame.

       

      Please suggest me.

       

      Message was edited by: hurix@123

        • 1. Re: xml with box text
          csm_phil Level 4

          Hi Hurix,

           

          Please try the below JS code, PlaceintoInlineFrame move the only one tag texts.

           

           

          var linkElementList = rootElement .evaluateXPathExpression("//boxed-text");
          for(var lp=linkElementList.length-1; lp>=0; lp--){
                  var myElement = linkElementList[lp];
                  var myTextframe = myElement.placeIntoFrame(mydoc.pages[0], ["30p","25p", "50p", "20p"]);
              }
          

           

           

          thx,

          csm_phil

          • 2. Re: xml with box text
            hurix@123 Level 1

            It works,

             

            This text frame i have to place top or bottom on the page layout.

             

            can you suggest me.

             

            ram

            1 person found this helpful