2 Replies Latest reply on Jul 12, 2016 9:33 PM by johnp45247251

    Xml rule processor "//div" cannot find using applescript

    johnp45247251 Level 1

      Hi everyone!


           In indesign xml pre processor, cannot find "div" xml element using applescript.

      I have try some code but in this case not working. Please give any ideas..



      This is my code:


      tell application "Adobe InDesign CS6"

          set xpath to {"//div"}

          set myRuleProcessor to make XML rule processor with properties {rule paths:xpath}

          set myRootXMLElement to XML element 1 of document 1

          tell myRuleProcessor

              set myMatchData to start processing rule set initial element myRootXMLElement

              repeat while myMatchData is not equal to nothing

                  set myElement to get element of myMatchData


                  select myElement

                  set myMatchData to nothing

              end repeat

          end tell

      end tell



      Thanks in Advance.