2 Replies Latest reply on May 4, 2016 11:47 PM by karthiks94217840

    Can someone please help me to run this script

    prtamil

      var st=app.activeDocument.xmlElements.item(0).evaluateXPathExpression("//section/title");

       

       

      var a =st.length

      alert (a);

       

      for(var i=0; i<st.length; i++)

          {

      if (st[i].paragraphs[0].appliedParagraphStyle=="Head A")

      st[i].paragraphs[0].appliedParagraphStyle="Heading 1"

      }

       

      every time I am getting the count is '0'. I checked with other XML tags also but still indesign wont throw the count.